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

Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway;
8
9 use eZ\Publish\Core\Base\Exceptions\DatabaseException;
10 use eZ\Publish\Core\Persistence\Legacy\Content\Section\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 insertSection($name, $identifier)
34 {
35 try {
36 return $this->innerGateway->insertSection($name, $identifier);
37 } catch (DBALException | PDOException $e) {
38 throw DatabaseException::wrap($e);
39 }
40 }
41
42 public function updateSection($id, $name, $identifier)
43 {
44 try {
45 return $this->innerGateway->updateSection($id, $name, $identifier);
46 } catch (DBALException | PDOException $e) {
47 throw DatabaseException::wrap($e);
48 }
49 }
50
51 public function loadSectionData($id)
52 {
53 try {
54 return $this->innerGateway->loadSectionData($id);
55 } catch (DBALException | PDOException $e) {
56 throw DatabaseException::wrap($e);
57 }
58 }
59
60 public function loadAllSectionData()
61 {
62 try {
63 return $this->innerGateway->loadAllSectionData();
64 } catch (DBALException | PDOException $e) {
65 throw DatabaseException::wrap($e);
66 }
67 }
68
69 public function loadSectionDataByIdentifier($identifier)
70 {
71 try {
72 return $this->innerGateway->loadSectionDataByIdentifier($identifier);
73 } catch (DBALException | PDOException $e) {
74 throw DatabaseException::wrap($e);
75 }
76 }
77
78 public function countContentObjectsInSection($id)
79 {
80 try {
81 return $this->innerGateway->countContentObjectsInSection($id);
82 } catch (DBALException | PDOException $e) {
83 throw DatabaseException::wrap($e);
84 }
85 }
86
87 public function countPoliciesUsingSection($id)
88 {
89 try {
90 return $this->innerGateway->countPoliciesUsingSection($id);
91 } catch (DBALException | PDOException $e) {
92 throw DatabaseException::wrap($e);
93 }
94 }
95
96 public function countRoleAssignmentsUsingSection($id)
97 {
98 try {
99 return $this->innerGateway->countRoleAssignmentsUsingSection($id);
100 } catch (DBALException | PDOException $e) {
101 throw DatabaseException::wrap($e);
102 }
103 }
104
105 public function deleteSection($id)
106 {
107 try {
108 return $this->innerGateway->deleteSection($id);
109 } catch (DBALException | PDOException $e) {
110 throw DatabaseException::wrap($e);
111 }
112 }
113
114 public function assignSectionToContent($sectionId, $contentId)
115 {
116 try {
117 return $this->innerGateway->assignSectionToContent($sectionId, $contentId);
118 } catch (DBALException | PDOException $e) {
119 throw DatabaseException::wrap($e);
120 }
121 }
122 }
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\Section\Gateway\ExceptionConversion
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:15
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\__construct
__construct(Gateway $innerGateway)
Creates a new exception conversion gateway around $innerGateway.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:28
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\loadSectionDataByIdentifier
loadSectionDataByIdentifier($identifier)
Loads data for section with $identifier.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:69
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\updateSection
updateSection($id, $name, $identifier)
Updates section with $id to have $name and $identifier.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:42
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\countPoliciesUsingSection
countPoliciesUsingSection($id)
Counts the number of role policies using section with $id in their limitations.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:87
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\loadAllSectionData
loadAllSectionData()
Loads data for all sections.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:60
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\assignSectionToContent
assignSectionToContent($sectionId, $contentId)
Inserts the assignment of $contentId to $sectionId.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:114
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\deleteSection
deleteSection($id)
Deletes the Section with $id.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:105
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\insertSection
insertSection($name, $identifier)
Inserts a new section with $name and $identifier.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:33
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\loadSectionData
loadSectionData($id)
Loads data for section with $id.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:51
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\countContentObjectsInSection
countContentObjectsInSection($id)
Counts the number of content objects assigned to section with $id.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:78
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\$innerGateway
$innerGateway
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:21
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway\ExceptionConversion\countRoleAssignmentsUsingSection
countRoleAssignmentsUsingSection($id)
Counts the number of role assignments using section with $id in their limitations.
Definition: Persistence/Legacy/Content/Section/Gateway/ExceptionConversion.php:96
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway
Section Handler.
Definition: Persistence/Legacy/Content/Section/Gateway.php:13
eZ\Publish\Core\Persistence\Legacy\Content\Section\Gateway
Definition: Persistence/Legacy/Content/Section/Gateway/DoctrineDatabase.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.