loadRow() abstract public method

Loads single row matched by composite primary key.
abstract public loadRow ( mixed $parentId, string $textMD5 ) : array
$parentId mixed
$textMD5 string
return array
Ejemplo n.º 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);
 }
 /**
  * Loads single row data matched by composite primary key.
  *
  * @param mixed $parentId
  * @param string $textMD5
  *
  * @return array
  */
 public function loadRow($parentId, $textMD5)
 {
     try {
         return $this->innerGateway->loadRow($parentId, $textMD5);
     } catch (DBALException $e) {
         throw new \RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new \RuntimeException('Database error', 0, $e);
     }
 }