From 80e51b77ffcfba4481bc4d064fa45cb2226026a1 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Mon, 24 Sep 2018 16:06:47 +0200 Subject: [PATCH] Improved code related to EZP-29139 (#2454) * Improved Query selection logic in Content Gateway * [SPI] Improved list of thrown exceptions in PhpDocs of URLAlias Handler --- Persistence/Content/UrlAlias/Handler.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Persistence/Content/UrlAlias/Handler.php b/Persistence/Content/UrlAlias/Handler.php index 70f371434..2f95a5c1d 100644 --- a/Persistence/Content/UrlAlias/Handler.php +++ b/Persistence/Content/UrlAlias/Handler.php @@ -69,6 +69,8 @@ public function createGlobalUrlAlias($resource, $path, $forwarding = false, $lan /** * List global aliases. * + * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException if path for any of the global URL aliases is broken + * * @param string|null $languageCode * @param int $offset * @param int $limit @@ -80,6 +82,8 @@ public function listGlobalURLAliases($languageCode = null, $offset = 0, $limit = /** * List of url entries of $urlType, pointing to $locationId. * + * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException if any path for the Location is broken + * * @param mixed $locationId * @param bool $custom if true the user generated aliases are listed otherwise the autogenerated * @@ -102,6 +106,8 @@ public function removeURLAliases(array $urlAliases); * Looks up a url alias for the given url. * * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException + * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException + * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException if the stored path for the given URL is broken * * @param string $url * @@ -112,9 +118,9 @@ public function lookup($url); /** * Loads URL alias by given $id. * - * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException + * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException if path for the given URL alias is broken * - * @param string $id + * @param string $id unique identifier in the form of "-" * * @return \eZ\Publish\SPI\Persistence\Content\UrlAlias */