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

Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway;
8
9 use eZ\Publish\Core\Base\Exceptions\DatabaseException;
10 use eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway;
11 use Doctrine\DBAL\DBALException;
12 use PDOException;
13
14 class ExceptionConversion extends Gateway
15 {
21 protected $innerGateway;
22
28 public function __construct(Gateway $innerGateway)
29 {
30 $this->innerGateway = $innerGateway;
31 }
32
33 public function setTable($name)
34 {
35 try {
36 return $this->innerGateway->setTable($name);
37 } catch (DBALException | PDOException $e) {
38 throw DatabaseException::wrap($e);
39 }
40 }
41
42 public function loadAllLocationEntries(int $locationId): array
43 {
44 try {
45 return $this->innerGateway->loadAllLocationEntries($locationId);
46 } catch (DBALException | PDOException $e) {
47 throw DatabaseException::wrap($e);
48 }
49 }
50
51 public function loadLocationEntries($locationId, $custom = false, $languageId = false)
52 {
53 try {
54 return $this->innerGateway->loadLocationEntries($locationId, $custom);
55 } catch (DBALException | PDOException $e) {
56 throw DatabaseException::wrap($e);
57 }
58 }
59
60 public function isRootEntry($id)
61 {
62 try {
63 return $this->innerGateway->isRootEntry($id);
64 } catch (DBALException | PDOException $e) {
65 throw DatabaseException::wrap($e);
66 }
67 }
68
69 public function cleanupAfterPublish($action, $languageId, $newId, $parentId, $textMD5)
70 {
71 try {
72 $this->innerGateway->cleanupAfterPublish($action, $languageId, $newId, $parentId, $textMD5);
73 } catch (DBALException | PDOException $e) {
74 throw DatabaseException::wrap($e);
75 }
76 }
77
78 public function historizeBeforeSwap($action, $languageMask)
79 {
80 try {
81 $this->innerGateway->historizeBeforeSwap($action, $languageMask);
82 } catch (DBALException | PDOException $e) {
83 throw DatabaseException::wrap($e);
84 }
85 }
86
87 public function historizeId($id, $link)
88 {
89 try {
90 $this->innerGateway->historizeId($id, $link);
91 } catch (DBALException | PDOException $e) {
92 throw DatabaseException::wrap($e);
93 }
94 }
95
96 public function reparent($oldParentId, $newParentId)
97 {
98 try {
99 $this->innerGateway->reparent($oldParentId, $newParentId);
100 } catch (DBALException | PDOException $e) {
101 throw DatabaseException::wrap($e);
102 }
103 }
104
105 public function updateRow($parentId, $textMD5, array $values)
106 {
107 try {
108 $this->innerGateway->updateRow($parentId, $textMD5, $values);
109 } catch (DBALException | PDOException $e) {
110 throw DatabaseException::wrap($e);
111 }
112 }
113
114 public function insertRow(array $values)
115 {
116 try {
117 return $this->innerGateway->insertRow($values);
118 } catch (DBALException | PDOException $e) {
119 throw DatabaseException::wrap($e);
120 }
121 }
122
123 public function loadRow($parentId, $textMD5)
124 {
125 try {
126 return $this->innerGateway->loadRow($parentId, $textMD5);
127 } catch (DBALException | PDOException $e) {
128 throw DatabaseException::wrap($e);
129 }
130 }
131
132 public function loadAutogeneratedEntry($action, $parentId = null)
133 {
134 try {
135 return $this->innerGateway->loadAutogeneratedEntry($action, $parentId);
136 } catch (DBALException | PDOException $e) {
137 throw DatabaseException::wrap($e);
138 }
139 }
140
141 public function remove($action, $id = null)
142 {
143 try {
144 $this->innerGateway->remove($action, $id);
145 } catch (DBALException | PDOException $e) {
146 throw DatabaseException::wrap($e);
147 }
148 }
149
150 public function listGlobalEntries($languageCode = null, $offset = 0, $limit = -1)
151 {
152 try {
153 return $this->innerGateway->listGlobalEntries($languageCode, $offset, $limit);
154 } catch (DBALException | PDOException $e) {
155 throw DatabaseException::wrap($e);
156 }
157 }
158
159 public function removeCustomAlias($parentId, $textMD5)
160 {
161 try {
162 return $this->innerGateway->removeCustomAlias($parentId, $textMD5);
163 } catch (DBALException | PDOException $e) {
164 throw DatabaseException::wrap($e);
165 }
166 }
167
168 public function loadUrlAliasData(array $urlHashes)
169 {
170 try {
171 return $this->innerGateway->loadUrlAliasData($urlHashes);
172 } catch (DBALException | PDOException $e) {
173 throw DatabaseException::wrap($e);
174 }
175 }
176
177 public function loadPathData($id)
178 {
179 try {
180 return $this->innerGateway->loadPathData($id);
181 } catch (DBALException | PDOException $e) {
182 throw DatabaseException::wrap($e);
183 }
184 }
185
186 public function loadPathDataByHierarchy(array $hierarchyData)
187 {
188 try {
189 return $this->innerGateway->loadPathDataByHierarchy($hierarchyData);
190 } catch (DBALException | PDOException $e) {
191 throw DatabaseException::wrap($e);
192 }
193 }
194
195 public function loadAutogeneratedEntries($parentId, $includeHistory = false)
196 {
197 try {
198 return $this->innerGateway->loadAutogeneratedEntries($parentId, $includeHistory);
199 } catch (DBALException | PDOException $e) {
200 throw DatabaseException::wrap($e);
201 }
202 }
203
204 public function getNextId()
205 {
206 try {
207 return $this->innerGateway->getNextId();
208 } catch (DBALException | PDOException $e) {
209 throw DatabaseException::wrap($e);
210 }
211 }
212
213 public function getLocationContentMainLanguageId($locationId)
214 {
215 try {
216 return $this->innerGateway->getLocationContentMainLanguageId($locationId);
217 } catch (DBALException | PDOException $e) {
218 throw DatabaseException::wrap($e);
219 }
220 }
221
222 public function bulkRemoveTranslation($languageId, $actions)
223 {
224 try {
225 return $this->innerGateway->bulkRemoveTranslation($languageId, $actions);
226 } catch (DBALException | PDOException $e) {
227 throw DatabaseException::wrap($e);
228 }
229 }
230
231 public function archiveUrlAliasesForDeletedTranslations($locationId, $parentId, array $languageIds)
232 {
233 try {
234 $this->innerGateway->archiveUrlAliasesForDeletedTranslations($locationId, $parentId, $languageIds);
235 } catch (DBALException | PDOException $e) {
236 throw DatabaseException::wrap($e);
237 }
238 }
239
240 public function deleteUrlAliasesWithoutLocation()
241 {
242 try {
243 return $this->innerGateway->deleteUrlAliasesWithoutLocation();
244 } catch (DBALException | PDOException $e) {
245 throw DatabaseException::wrap($e);
246 }
247 }
248
249 public function deleteUrlAliasesWithoutParent()
250 {
251 try {
252 return $this->innerGateway->deleteUrlAliasesWithoutParent();
253 } catch (DBALException | PDOException $e) {
254 throw DatabaseException::wrap($e);
255 }
256 }
257
258 public function deleteUrlAliasesWithBrokenLink()
259 {
260 try {
261 return $this->innerGateway->deleteUrlAliasesWithBrokenLink();
262 } catch (DBALException | PDOException $e) {
263 throw DatabaseException::wrap($e);
264 }
265 }
266
267 public function repairBrokenUrlAliasesForLocation(int $locationId)
268 {
269 try {
270 return $this->innerGateway->repairBrokenUrlAliasesForLocation($locationId);
271 } catch (DBALException | PDOException $e) {
272 throw DatabaseException::wrap($e);
273 }
274 }
275
276 public function deleteUrlNopAliasesWithoutChildren(): int
277 {
278 try {
279 return $this->innerGateway->deleteUrlNopAliasesWithoutChildren();
280 } catch (DBALException | PDOException $e) {
281 throw DatabaseException::wrap($e);
282 }
283 }
284
285 public function getAllChildrenAliases(int $parentId): array
286 {
287 try {
288 return $this->innerGateway->getAllChildrenAliases($parentId);
289 } catch (DBALException | PDOException $e) {
290 throw DatabaseException::wrap($e);
291 }
292 }
293 }
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\UrlAlias\Gateway\ExceptionConversion
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:15
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\repairBrokenUrlAliasesForLocation
repairBrokenUrlAliasesForLocation(int $locationId)
Attempt repairing data corruption for broken archived URL aliases for Location, assuming there exists...
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:267
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\reparent
reparent($oldParentId, $newParentId)
Updates parent id of autogenerated entries.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:96
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\deleteUrlNopAliasesWithoutChildren
deleteUrlNopAliasesWithoutChildren()
Delete "nop" type actions URL aliases that don't have children.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:276
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadRow
loadRow($parentId, $textMD5)
Loads single row matched by composite primary key.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:123
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadAutogeneratedEntries
loadAutogeneratedEntries($parentId, $includeHistory=false)
Loads all autogenerated entries with given $parentId with optionally included history entries.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:195
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\getNextId
getNextId()
Returns next value for "id" column.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:204
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\deleteUrlAliasesWithoutParent
deleteUrlAliasesWithoutParent()
Delete URL aliases pointing to non-existent parent nodes.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:249
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\getLocationContentMainLanguageId
getLocationContentMainLanguageId($locationId)
Returns main language ID of the Content on the Location with given $locationId.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:213
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\getAllChildrenAliases
getAllChildrenAliases(int $parentId)
Return aliases which are connected with provided parentId.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:285
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadUrlAliasData
loadUrlAliasData(array $urlHashes)
Loads complete URL alias data by given array of path hashes.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:168
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\cleanupAfterPublish
cleanupAfterPublish($action, $languageId, $newId, $parentId, $textMD5)
Downgrades autogenerated entry matched by given $action and $languageId and negatively matched by com...
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:69
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\deleteUrlAliasesWithBrokenLink
deleteUrlAliasesWithBrokenLink()
Delete URL aliases which do not link to any existing URL alias node.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:258
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\bulkRemoveTranslation
bulkRemoveTranslation($languageId, $actions)
Removes languageId of removed translation from lang_mask and deletes single language rows for multipl...
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:222
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\isRootEntry
isRootEntry($id)
Returns boolean indicating if the row with given $id is special root entry.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:60
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\removeCustomAlias
removeCustomAlias($parentId, $textMD5)
Deletes single custom alias row matched by composite primary key.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:159
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\archiveUrlAliasesForDeletedTranslations
archiveUrlAliasesForDeletedTranslations($locationId, $parentId, array $languageIds)
Archive (remove or historize) URL aliases for removed Translations.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:231
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\insertRow
insertRow(array $values)
Inserts new row in urlalias_ml table.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:114
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\updateRow
updateRow($parentId, $textMD5, array $values)
Updates single row data matched by composite primary key.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:105
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\__construct
__construct(Gateway $innerGateway)
Creates a new exception conversion gateway around $innerGateway.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:28
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\listGlobalEntries
listGlobalEntries($languageCode=null, $offset=0, $limit=-1)
Loads paged list of global aliases.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:150
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadPathDataByHierarchy
loadPathDataByHierarchy(array $hierarchyData)
Loads path data identified by given ordered array of hierarchy data.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:186
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\setTable
setTable($name)
Changes the gateway database table.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:33
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadAutogeneratedEntry
loadAutogeneratedEntry($action, $parentId=null)
Loads autogenerated entry id by given $action and optionally $parentId.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:132
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\$innerGateway
$innerGateway
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:21
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\historizeBeforeSwap
historizeBeforeSwap($action, $languageMask)
Historizes entry with $action by $languageMask.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:78
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadLocationEntries
loadLocationEntries($locationId, $custom=false, $languageId=false)
Loads list of aliases by given $locationId.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:51
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadAllLocationEntries
loadAllLocationEntries(int $locationId)
Loads all list of aliases by given $locationId.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:42
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\historizeId
historizeId($id, $link)
Marks all entries with given $id as history entries.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:87
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\deleteUrlAliasesWithoutLocation
deleteUrlAliasesWithoutLocation()
Delete URL aliases pointing to non-existent Locations.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:240
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\ExceptionConversion\loadPathData
loadPathData($id)
Loads path data identified by given $id.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/ExceptionConversion.php:177
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway
UrlAlias Gateway.
Definition: Persistence/Legacy/Content/UrlAlias/Gateway.php:13
eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway
Definition: Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.