Loads data for the Language with $id.
abstract public loadLanguageData ( integer $id ) : string[][] | ||
$id | integer | |
리턴 | string[][] |
/** * Get language by id. * * @param mixed $id * * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If language could not be found by $id * * @return \eZ\Publish\SPI\Persistence\Content\Language */ public function load($id) { $languages = $this->languageMapper->extractLanguagesFromRows($this->languageGateway->loadLanguageData($id)); if (count($languages) < 1) { throw new NotFoundException('Language', $id); } return reset($languages); }
/** * Loads data for the Language with $id * * @param int $id * * @return string[][] */ public function loadLanguageData($id) { try { return $this->innerGateway->loadLanguageData($id); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }