loadPathData() abstract public method

Loads path data identified by given $id.
abstract public loadPathData ( mixed $id ) : array
$id mixed
return array
コード例 #1
0
 /**
  * Loads URL alias by given $id.
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException
  *
  * @param string $id
  *
  * @return \eZ\Publish\SPI\Persistence\Content\UrlAlias
  */
 public function loadUrlAlias($id)
 {
     list($parentId, $textMD5) = explode('-', $id);
     $data = $this->gateway->loadRow($parentId, $textMD5);
     if (empty($data)) {
         throw new NotFoundException('URLAlias', $id);
     }
     $data['raw_path_data'] = $this->gateway->loadPathData($data['id']);
     return $this->mapper->extractUrlAliasFromData($data);
 }
コード例 #2
0
 /**
  * Loads all data for the path identified by given $id.
  *
  * @param mixed $id
  *
  * @return array
  */
 public function loadPathData($id)
 {
     try {
         return $this->innerGateway->loadPathData($id);
     } catch (DBALException $e) {
         throw new \RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new \RuntimeException('Database error', 0, $e);
     }
 }