Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway;
8
9 use eZ\Publish\Core\Base\Exceptions\DatabaseException;
10 use eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway;
11 use eZ\Publish\SPI\Persistence\Content\UrlWildcard;
12 use Doctrine\DBAL\DBALException;
13 use PDOException;
14
15 class ExceptionConversion extends Gateway
16 {
22 protected $innerGateway;
23
29 public function __construct(Gateway $innerGateway)
30 {
31 $this->innerGateway = $innerGateway;
32 }
33
34 public function insertUrlWildcard(UrlWildcard $urlWildcard)
35 {
36 try {
37 return $this->innerGateway->insertUrlWildcard($urlWildcard);
38 } catch (DBALException | PDOException $e) {
39 throw DatabaseException::wrap($e);
40 }
41 }
42
43 public function deleteUrlWildcard($id)
44 {
45 try {
46 return $this->innerGateway->deleteUrlWildcard($id);
47 } catch (DBALException | PDOException $e) {
48 throw DatabaseException::wrap($e);
49 }
50 }
51
52 public function loadUrlWildcardData($parentId)
53 {
54 try {
55 return $this->innerGateway->loadUrlWildcardData($parentId);
56 } catch (DBALException | PDOException $e) {
57 throw DatabaseException::wrap($e);
58 }
59 }
60
61 public function loadUrlWildcardsData($offset = 0, $limit = -1)
62 {
63 try {
64 return $this->innerGateway->loadUrlWildcardsData($offset, $limit);
65 } catch (DBALException | PDOException $e) {
66 throw DatabaseException::wrap($e);
67 }
68 }
69
70 public function loadUrlWildcardBySourceUrl(string $sourceUrl): array
71 {
72 try {
73 return $this->innerGateway->loadUrlWildcardBySourceUrl($sourceUrl);
74 } catch (DBALException | PDOException $e) {
75 throw DatabaseException::wrap($e);
76 }
77 }
78 }
eZ\Publish\Core\Base\Exceptions\DatabaseException
An exception that is thrown when the database encounters an error.
Definition: DatabaseException.php:18
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:16
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion\__construct
__construct(Gateway $innerGateway)
Creates a new exception conversion gateway around $innerGateway.
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:29
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion\loadUrlWildcardBySourceUrl
loadUrlWildcardBySourceUrl(string $sourceUrl)
Loads the UrlWildcard by source url $sourceUrl.
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:70
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion\$innerGateway
$innerGateway
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:22
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion\deleteUrlWildcard
deleteUrlWildcard($id)
Deletes the UrlWildcard with given $id.
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:43
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion\insertUrlWildcard
insertUrlWildcard(UrlWildcard $urlWildcard)
Inserts the given UrlWildcard.
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:34
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion\loadUrlWildcardData
loadUrlWildcardData($parentId)
Loads an array with data about UrlWildcard with $id.
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:52
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway\ExceptionConversion\loadUrlWildcardsData
loadUrlWildcardsData($offset=0, $limit=-1)
Loads an array with data about UrlWildcards (paged).
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/ExceptionConversion.php:61
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway
UrlWildcard Gateway.
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway.php:15
eZ\Publish\SPI\Persistence\Content\UrlWildcard
UrlWildCard models one url alias path with wild cards.
Definition: UrlWildcard.php:15
eZ\Publish\Core\Persistence\Legacy\Content\UrlWildcard\Gateway
Definition: Persistence/Legacy/Content/UrlWildcard/Gateway/DoctrineDatabase.php:7
eZ\Publish\SPI\Persistence\Content\UrlWildcard
Definition: SPI/Persistence/Content/UrlWildcard/Handler.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.