loadSectionDataByIdentifier() abstract public method

Loads data for section with $identifier.
abstract public loadSectionDataByIdentifier ( string $identifier ) : string[][]
$identifier string
return string[][]
Exemplo n.º 1
0
 /**
  * Get section data by identifier
  *
  * @param string $identifier
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If section is not found
  *
  * @return \eZ\Publish\SPI\Persistence\Content\Section
  */
 public function loadByIdentifier($identifier)
 {
     $rows = $this->sectionGateway->loadSectionDataByIdentifier($identifier);
     if (empty($rows)) {
         throw new NotFound("Section", $identifier);
     }
     return $this->createSectionFromArray(reset($rows));
 }
Exemplo n.º 2
0
 /**
  * Loads data for section with $identifier.
  *
  * @param string $identifier
  *
  * @return string[][]
  */
 public function loadSectionDataByIdentifier($identifier)
 {
     try {
         return $this->innerGateway->loadSectionDataByIdentifier($identifier);
     } catch (DBALException $e) {
         throw new RuntimeException('Database error', 0, $e);
     } catch (PDOException $e) {
         throw new RuntimeException('Database error', 0, $e);
     }
 }