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

Search/Legacy/Content/Location/Gateway/ExceptionConversion.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Search\Legacy\Content\Location\Gateway;
8
9 use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
10 use eZ\Publish\Core\Search\Legacy\Content\Location\Gateway;
11 use Doctrine\DBAL\DBALException;
12 use PDOException;
13 use RuntimeException;
14
18 class ExceptionConversion extends Gateway
19 {
25 protected $innerGateway;
26
32 public function __construct(Gateway $innerGateway)
33 {
34 $this->innerGateway = $innerGateway;
35 }
36
51 public function find(
52 Criterion $criterion,
53 $offset = 0,
54 $limit = null,
55 array $sortClauses = null,
56 array $languageFilter = [],
57 $doCount = true
58 ) {
59 try {
60 return $this->innerGateway->find($criterion, $offset, $limit, $sortClauses, $languageFilter, $doCount);
61 } catch (DBALException $e) {
62 throw new RuntimeException('Database error', 0, $e);
63 } catch (PDOException $e) {
64 throw new RuntimeException('Database error', 0, $e);
65 }
66 }
67 }
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion.php:15
eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\ExceptionConversion
Base class for location gateways.
Definition: Search/Legacy/Content/Location/Gateway/ExceptionConversion.php:19
eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\ExceptionConversion\$innerGateway
$innerGateway
Definition: Search/Legacy/Content/Location/Gateway/ExceptionConversion.php:25
eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\ExceptionConversion\find
find(Criterion $criterion, $offset=0, $limit=null, array $sortClauses=null, array $languageFilter=[], $doCount=true)
Returns total count and data for all Locations satisfying the parameters.
Definition: Search/Legacy/Content/Location/Gateway/ExceptionConversion.php:51
eZ\Publish\Core\Search\Legacy\Content\Location\Gateway\ExceptionConversion\__construct
__construct(Gateway $innerGateway)
Creates a new exception conversion gateway around $innerGateway.
Definition: Search/Legacy/Content/Location/Gateway/ExceptionConversion.php:32
eZ\Publish\Core\Search\Legacy\Content\Location\Gateway
Base class for location search gateways.
Definition: Search/Legacy/Content/Location/Gateway.php:15
eZ\Publish\API\Repository\Values\Content\Query\Criterion
Definition: API/Repository/Values/Content/Query/Criterion/Ancestor.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.