swap() abstract public method

Make the location identified by $locationId1 refer to the Content referred to by $locationId2 and vice versa.
abstract public swap ( mixed $locationId1, mixed $locationId2 ) : boolean
$locationId1 mixed
$locationId2 mixed
return boolean
 /**
  * Swaps the content object being pointed to by a location object.
  *
  * Make the location identified by $locationId1 refer to the Content
  * referred to by $locationId2 and vice versa.
  *
  * @param mixed $locationId1
  * @param mixed $locationId2
  *
  * @return boolean
  */
 public function swap($locationId1, $locationId2)
 {
     try {
         return $this->innerGateway->swap($locationId1, $locationId2);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }
示例#2
0
 /**
  * Swaps the content object being pointed to by a location object.
  *
  * Make the location identified by $locationId1 refer to the Content
  * referred to by $locationId2 and vice versa.
  *
  * @param mixed $locationId1
  * @param mixed $locationId2
  *
  * @return boolean
  */
 public function swap($locationId1, $locationId2)
 {
     $this->locationGateway->swap($locationId1, $locationId2);
 }