/** * Loads a url wild card * * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException if the url wild card was not found * * @param mixed $id * * @return \eZ\Publish\SPI\Persistence\Content\UrlWildcard */ public function load($id) { $row = $this->gateway->loadUrlWildcardData($id); if (empty($row)) { throw new NotFoundException("UrlWildcard", $id); } return $this->mapper->extractUrlWildcardFromRow($row); }
/** * @param mixed $parentId * * @return array */ public function loadUrlWildcardData($parentId) { try { return $this->innerGateway->loadUrlWildcardData($parentId); } catch (DBALException $e) { throw new \RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new \RuntimeException('Database error', 0, $e); } }