| Total Complexity | 72 |
| Total Lines | 682 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
Complex classes like Redirects often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Redirects, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 40 | class Redirects extends Component |
||
| 41 | { |
||
| 42 | // Constants |
||
| 43 | // ========================================================================= |
||
| 44 | |||
| 45 | const CACHE_KEY = 'retour_redirect_'; |
||
| 46 | |||
| 47 | const GLOBAL_REDIRECTS_CACHE_TAG = 'retour_redirects'; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @event RedirectEvent The event that is triggered before the redirect is saved |
||
| 51 | * You may set [[RedirectEvent::isValid]] to `false` to prevent the redirect from getting saved. |
||
| 52 | * |
||
| 53 | * ```php |
||
| 54 | * use nystudio107\retour\services\Redirects; |
||
| 55 | * use nystudio107\retour\events\RedirectEvent; |
||
| 56 | * |
||
| 57 | * Event::on(Redirects::class, |
||
| 58 | * Redirects::EVENT_BEFORE_SAVE_REDIRECT, |
||
| 59 | * function(RedirectEvent $event) { |
||
| 60 | * // potentially set $event->isValid; |
||
| 61 | * } |
||
| 62 | * ); |
||
| 63 | * ``` |
||
| 64 | */ |
||
| 65 | const EVENT_BEFORE_SAVE_REDIRECT = 'beforeSaveRedirect'; |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @event RedirectEvent The event that is triggered after the redirect is saved |
||
| 69 | * |
||
| 70 | * ```php |
||
| 71 | * use nystudio107\retour\services\Redirects; |
||
| 72 | * use nystudio107\retour\events\RedirectEvent; |
||
| 73 | * |
||
| 74 | * Event::on(Redirects::class, |
||
| 75 | * Redirects::EVENT_AFTER_SAVE_REDIRECT, |
||
| 76 | * function(RedirectEvent $event) { |
||
| 77 | * // the redirect was saved |
||
| 78 | * } |
||
| 79 | * ); |
||
| 80 | * ``` |
||
| 81 | */ |
||
| 82 | const EVENT_AFTER_SAVE_REDIRECT = 'afterSaveRedirect'; |
||
| 83 | |||
| 84 | // Protected Properties |
||
| 85 | // ========================================================================= |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @var null|array |
||
| 89 | */ |
||
| 90 | protected $cachedStaticRedirects; |
||
| 91 | |||
| 92 | // Public Methods |
||
| 93 | // ========================================================================= |
||
| 94 | |||
| 95 | /** |
||
| 96 | * Handle 404s by looking for redirects |
||
| 97 | */ |
||
| 98 | public function handle404() |
||
| 99 | { |
||
| 100 | Craft::info( |
||
| 101 | Craft::t( |
||
| 102 | 'retour', |
||
| 103 | 'A 404 exception occurred' |
||
| 104 | ), |
||
| 105 | __METHOD__ |
||
| 106 | ); |
||
| 107 | $request = Craft::$app->getRequest(); |
||
| 108 | // We only want site requests that are not live preview or console requests |
||
| 109 | if ($request->getIsSiteRequest() && !$request->getIsLivePreview() && !$request->getIsConsoleRequest()) { |
||
| 110 | // See if we should redirect |
||
| 111 | try { |
||
| 112 | $fullUrl = urldecode($request->getAbsoluteUrl()); |
||
| 113 | $pathOnly = urldecode($request->getUrl()); |
||
| 114 | } catch (InvalidConfigException $e) { |
||
| 115 | Craft::error( |
||
| 116 | $e->getMessage(), |
||
| 117 | __METHOD__ |
||
| 118 | ); |
||
| 119 | $pathOnly = ''; |
||
| 120 | $fullUrl = ''; |
||
| 121 | } |
||
| 122 | // Strip the query string if `alwaysStripQueryString` is set |
||
| 123 | if (Retour::$settings->alwaysStripQueryString) { |
||
| 124 | $fullUrl = UrlHelper::stripQueryString($fullUrl); |
||
| 125 | $pathOnly = UrlHelper::stripQueryString($pathOnly); |
||
| 126 | } |
||
| 127 | Craft::info( |
||
| 128 | Craft::t( |
||
| 129 | 'retour', |
||
| 130 | '404 full URL: {fullUrl}, 404 path only: {pathOnly}', |
||
| 131 | ['fullUrl' => $fullUrl, 'pathOnly' => $pathOnly] |
||
| 132 | ), |
||
| 133 | __METHOD__ |
||
| 134 | ); |
||
| 135 | if (!$this->excludeUri($pathOnly)) { |
||
| 136 | // Redirect if we find a match, otherwise let Craft handle it |
||
| 137 | $redirect = $this->findRedirectMatch($fullUrl, $pathOnly); |
||
| 138 | if (!$this->doRedirect($fullUrl, $pathOnly, $redirect) && !Retour::$settings->alwaysStripQueryString) { |
||
| 139 | // Try it again without the query string |
||
| 140 | $fullUrl = UrlHelper::stripQueryString($fullUrl); |
||
| 141 | $pathOnly = UrlHelper::stripQueryString($pathOnly); |
||
| 142 | $redirect = $this->findRedirectMatch($fullUrl, $pathOnly); |
||
| 143 | $this->doRedirect($fullUrl, $pathOnly, $redirect); |
||
| 144 | } |
||
| 145 | // Increment the stats |
||
| 146 | Retour::$plugin->statistics->incrementStatistics($pathOnly, false); |
||
| 147 | } |
||
| 148 | } |
||
| 149 | } |
||
| 150 | |||
| 151 | /** |
||
| 152 | * Do the redirect |
||
| 153 | * |
||
| 154 | * @param string $fullUrl |
||
| 155 | * @param string $pathOnly |
||
| 156 | * @param null|array $redirect |
||
| 157 | * |
||
| 158 | * @return bool false if not redirected |
||
| 159 | */ |
||
| 160 | public function doRedirect(string $fullUrl, string $pathOnly, $redirect): bool |
||
| 161 | { |
||
| 162 | $response = Craft::$app->getResponse(); |
||
| 163 | if ($redirect !== null) { |
||
| 164 | // Figure out what type of source matching was done |
||
| 165 | $redirectSrcMatch = $redirect['redirectSrcMatch'] ?? 'pathonly'; |
||
| 166 | switch ($redirectSrcMatch) { |
||
| 167 | case 'pathonly': |
||
| 168 | $url = $pathOnly; |
||
| 169 | break; |
||
| 170 | case 'fullurl': |
||
| 171 | $url = $fullUrl; |
||
| 172 | break; |
||
| 173 | default: |
||
| 174 | $url = $pathOnly; |
||
| 175 | break; |
||
| 176 | } |
||
| 177 | $dest = $redirect['redirectDestUrl']; |
||
| 178 | if (Retour::$settings->preserveQueryString) { |
||
| 179 | $request = Craft::$app->getRequest(); |
||
| 180 | if (!empty($request->getQueryStringWithoutPath())) { |
||
| 181 | $dest .= '?' . $request->getQueryStringWithoutPath(); |
||
| 182 | } |
||
| 183 | } |
||
| 184 | $status = $redirect['redirectHttpCode']; |
||
| 185 | Craft::info( |
||
| 186 | Craft::t( |
||
| 187 | 'retour', |
||
| 188 | 'Redirecting {url} to {dest} with status {status}', |
||
| 189 | ['url' => $url, 'dest' => $dest, 'status' => $status] |
||
| 190 | ), |
||
| 191 | __METHOD__ |
||
| 192 | ); |
||
| 193 | // Increment the stats |
||
| 194 | Retour::$plugin->statistics->incrementStatistics($url, true); |
||
| 195 | // Handle a Retour return status > 400 to render the actual error template |
||
| 196 | if ($status >= 400) { |
||
| 197 | Retour::$currentException->statusCode = $status; |
||
| 198 | $errorHandler = Craft::$app->getErrorHandler(); |
||
| 199 | $errorHandler->exception = Retour::$currentException; |
||
| 200 | try { |
||
| 201 | $response = Craft::$app->runAction('templates/render-error'); |
||
| 202 | } catch (InvalidRouteException $e) { |
||
| 203 | Craft::error($e->getMessage(), __METHOD__); |
||
| 204 | } catch (\yii\console\Exception $e) { |
||
| 205 | Craft::error($e->getMessage(), __METHOD__); |
||
| 206 | } |
||
| 207 | } |
||
| 208 | // Redirect the request away; |
||
| 209 | $response->redirect($dest, $status)->send(); |
||
| 210 | try { |
||
| 211 | Craft::$app->end(); |
||
| 212 | } catch (ExitException $e) { |
||
| 213 | Craft::error($e->getMessage(), __METHOD__); |
||
| 214 | } |
||
| 215 | } |
||
| 216 | |||
| 217 | return false; |
||
| 218 | } |
||
| 219 | |||
| 220 | /** |
||
| 221 | * @param string $fullUrl |
||
| 222 | * @param string $pathOnly |
||
| 223 | * |
||
| 224 | * @return array|null |
||
| 225 | */ |
||
| 226 | public function findRedirectMatch(string $fullUrl, string $pathOnly) |
||
| 227 | { |
||
| 228 | // Get the current site |
||
| 229 | $siteId = null; |
||
| 230 | $currentSite = Craft::$app->getSites()->currentSite; |
||
| 231 | if ($currentSite) { |
||
| 232 | $siteId = $currentSite->id; |
||
| 233 | } |
||
| 234 | // Try getting the full URL redirect from the cache |
||
| 235 | $redirect = $this->getRedirectFromCache($fullUrl, $siteId); |
||
|
|
|||
| 236 | if ($redirect) { |
||
| 237 | $this->incrementRedirectHitCount($redirect); |
||
| 238 | $this->saveRedirectToCache($fullUrl, $redirect); |
||
| 239 | |||
| 240 | return $redirect; |
||
| 241 | } |
||
| 242 | // Try getting the path only redirect from the cache |
||
| 243 | $redirect = $this->getRedirectFromCache($pathOnly, $siteId); |
||
| 244 | if ($redirect) { |
||
| 245 | $this->incrementRedirectHitCount($redirect); |
||
| 246 | $this->saveRedirectToCache($pathOnly, $redirect); |
||
| 247 | |||
| 248 | return $redirect; |
||
| 249 | } |
||
| 250 | // Resolve static redirects |
||
| 251 | $redirects = $this->getAllStaticRedirects(null, $siteId); |
||
| 252 | $redirect = $this->resolveRedirect($fullUrl, $pathOnly, $redirects); |
||
| 253 | if ($redirect) { |
||
| 254 | return $redirect; |
||
| 255 | } |
||
| 256 | |||
| 257 | return null; |
||
| 258 | } |
||
| 259 | |||
| 260 | /** |
||
| 261 | * @param $url |
||
| 262 | * @param int|null $siteId |
||
| 263 | * |
||
| 264 | * @return bool|array |
||
| 265 | */ |
||
| 266 | public function getRedirectFromCache($url, int $siteId = 0) |
||
| 281 | } |
||
| 282 | |||
| 283 | /** |
||
| 284 | * @param string $url |
||
| 285 | * @param array $redirect |
||
| 286 | */ |
||
| 287 | public function saveRedirectToCache($url, $redirect) |
||
| 288 | { |
||
| 289 | $cache = Craft::$app->getCache(); |
||
| 290 | // Get the current site id |
||
| 291 | $sites = Craft::$app->getSites(); |
||
| 292 | try { |
||
| 293 | $siteId = $sites->getCurrentSite()->id; |
||
| 294 | } catch (SiteNotFoundException $e) { |
||
| 295 | $siteId = 1; |
||
| 296 | } |
||
| 297 | $cacheKey = $this::CACHE_KEY.md5($url).$siteId; |
||
| 298 | // Create the dependency tags |
||
| 299 | $dependency = new TagDependency([ |
||
| 300 | 'tags' => [ |
||
| 301 | $this::GLOBAL_REDIRECTS_CACHE_TAG, |
||
| 302 | $this::GLOBAL_REDIRECTS_CACHE_TAG.$siteId, |
||
| 303 | ], |
||
| 304 | ]); |
||
| 305 | $cache->set($cacheKey, $redirect, Retour::$cacheDuration, $dependency); |
||
| 306 | Craft::info( |
||
| 307 | Craft::t( |
||
| 308 | 'retour', |
||
| 309 | 'Cached redirect saved for {url}', |
||
| 310 | ['url' => $url] |
||
| 311 | ), |
||
| 312 | __METHOD__ |
||
| 313 | ); |
||
| 314 | } |
||
| 315 | |||
| 316 | /** |
||
| 317 | * @param string $fullUrl |
||
| 318 | * @param string $pathOnly |
||
| 319 | * @param array $redirects |
||
| 320 | * |
||
| 321 | * @return array|null |
||
| 322 | */ |
||
| 323 | public function resolveRedirect(string $fullUrl, string $pathOnly, array $redirects) |
||
| 324 | { |
||
| 325 | $result = null; |
||
| 326 | foreach ($redirects as $redirect) { |
||
| 327 | // Figure out what type of source matching to do |
||
| 328 | $redirectSrcMatch = $redirect['redirectSrcMatch'] ?? 'pathonly'; |
||
| 329 | $redirectEnabled = (bool)$redirect['enabled']; |
||
| 330 | if ($redirectEnabled === true) { |
||
| 331 | switch ($redirectSrcMatch) { |
||
| 332 | case 'pathonly': |
||
| 333 | $url = $pathOnly; |
||
| 334 | break; |
||
| 335 | case 'fullurl': |
||
| 336 | $url = $fullUrl; |
||
| 337 | break; |
||
| 338 | default: |
||
| 339 | $url = $pathOnly; |
||
| 340 | break; |
||
| 341 | } |
||
| 342 | $redirectMatchType = $redirect['redirectMatchType'] ?? 'notfound'; |
||
| 343 | switch ($redirectMatchType) { |
||
| 344 | // Do a straight up match |
||
| 345 | case 'exactmatch': |
||
| 346 | if (strcasecmp($redirect['redirectSrcUrlParsed'], $url) === 0) { |
||
| 347 | $this->incrementRedirectHitCount($redirect); |
||
| 348 | $this->saveRedirectToCache($url, $redirect); |
||
| 349 | |||
| 350 | return $redirect; |
||
| 351 | } |
||
| 352 | break; |
||
| 353 | |||
| 354 | // Do a regex match |
||
| 355 | case 'regexmatch': |
||
| 356 | $matchRegEx = '`'.$redirect['redirectSrcUrlParsed'].'`i'; |
||
| 357 | if (preg_match($matchRegEx, $url) === 1) { |
||
| 358 | $this->incrementRedirectHitCount($redirect); |
||
| 359 | // If we're not associated with an EntryID, handle capture group replacement |
||
| 360 | if ((int)$redirect['associatedElementId'] === 0) { |
||
| 361 | $redirect['redirectDestUrl'] = preg_replace( |
||
| 362 | $matchRegEx, |
||
| 363 | $redirect['redirectDestUrl'], |
||
| 364 | $url |
||
| 365 | ); |
||
| 366 | } |
||
| 367 | $this->saveRedirectToCache($url, $redirect); |
||
| 368 | |||
| 369 | return $redirect; |
||
| 370 | } |
||
| 371 | break; |
||
| 372 | |||
| 373 | // Otherwise try to look up a plugin's method by and call it for the match |
||
| 374 | default: |
||
| 375 | $plugin = $redirectMatchType ? Craft::$app->getPlugins()->getPlugin($redirectMatchType) : null; |
||
| 376 | if ($plugin && method_exists($plugin, 'retourMatch')) { |
||
| 377 | $args = [ |
||
| 378 | [ |
||
| 379 | 'redirect' => &$redirect, |
||
| 380 | ], |
||
| 381 | ]; |
||
| 382 | $result = \call_user_func_array([$plugin, 'retourMatch'], $args); |
||
| 383 | if ($result) { |
||
| 384 | $this->incrementRedirectHitCount($redirect); |
||
| 385 | $this->saveRedirectToCache($url, $redirect); |
||
| 386 | |||
| 387 | return $redirect; |
||
| 388 | } |
||
| 389 | } |
||
| 390 | break; |
||
| 391 | } |
||
| 392 | } |
||
| 393 | } |
||
| 394 | Craft::info( |
||
| 395 | Craft::t( |
||
| 396 | 'retour', |
||
| 397 | 'Not handled-> full URL: {fullUrl}, path only: {pathOnly}', |
||
| 398 | ['fullUrl' => $fullUrl, 'pathOnly' => $pathOnly] |
||
| 399 | ), |
||
| 400 | __METHOD__ |
||
| 401 | ); |
||
| 402 | |||
| 403 | return $result; |
||
| 404 | } |
||
| 405 | |||
| 406 | /** |
||
| 407 | * Returns the list of matching schemes |
||
| 408 | * |
||
| 409 | * @return array |
||
| 410 | */ |
||
| 411 | public function getMatchesList(): array |
||
| 412 | { |
||
| 413 | $result = [ |
||
| 414 | 'exactmatch' => Craft::t('retour', 'Exact Match'), |
||
| 415 | 'regexmatch' => Craft::t('retour', 'RegEx Match'), |
||
| 416 | ]; |
||
| 417 | |||
| 418 | // Add any plugins that offer the retourMatch() method |
||
| 419 | foreach (Craft::$app->getPlugins()->getAllPlugins() as $plugin) { |
||
| 420 | /** @var Plugin $plugin */ |
||
| 421 | if (method_exists($plugin, 'retourMatch')) { |
||
| 422 | $result[$plugin->getHandle()] = $plugin->name.Craft::t('retour', ' Match'); |
||
| 423 | } |
||
| 424 | } |
||
| 425 | |||
| 426 | return $result; |
||
| 427 | } |
||
| 428 | |||
| 429 | /** |
||
| 430 | * @param null|int $limit |
||
| 431 | * @param int|null $siteId |
||
| 432 | * |
||
| 433 | * @return array All of the statistics |
||
| 434 | */ |
||
| 435 | public function getAllStaticRedirects($limit = null, int $siteId = null): array |
||
| 436 | { |
||
| 437 | // Cache it in our class; no need to fetch it more than once |
||
| 438 | if ($this->cachedStaticRedirects !== null) { |
||
| 439 | return $this->cachedStaticRedirects; |
||
| 440 | } |
||
| 441 | // Query the db table |
||
| 442 | $query = (new Query()) |
||
| 443 | ->from(['{{%retour_static_redirects}}']) |
||
| 444 | ->orderBy('redirectMatchType ASC, redirectSrcMatch ASC, hitCount DESC'); |
||
| 445 | if ($siteId) { |
||
| 446 | $query |
||
| 447 | ->where(['siteId' => $siteId]) |
||
| 448 | ->orWhere(['siteId' => null]); |
||
| 449 | } |
||
| 450 | if ($limit) { |
||
| 451 | $query->limit($limit); |
||
| 452 | } |
||
| 453 | $redirects = $query->all(); |
||
| 454 | // Cache for future accesses |
||
| 455 | $this->cachedStaticRedirects = $redirects; |
||
| 456 | |||
| 457 | return $redirects; |
||
| 458 | } |
||
| 459 | |||
| 460 | /** |
||
| 461 | * Return a redirect by id |
||
| 462 | * |
||
| 463 | * @param int $id |
||
| 464 | * |
||
| 465 | * @return null|array The static redirect |
||
| 466 | */ |
||
| 467 | public function getRedirectById(int $id) |
||
| 468 | { |
||
| 469 | // Query the db table |
||
| 470 | $redirect = (new Query()) |
||
| 471 | ->from(['{{%retour_static_redirects}}']) |
||
| 472 | ->where(['id' => $id]) |
||
| 473 | ->one(); |
||
| 474 | |||
| 475 | return $redirect; |
||
| 476 | } |
||
| 477 | |||
| 478 | /** |
||
| 479 | * Return a redirect by redirectSrcUrl |
||
| 480 | * |
||
| 481 | * @param string $redirectSrcUrl |
||
| 482 | * @param int|null $siteId |
||
| 483 | * |
||
| 484 | * @return null|array |
||
| 485 | */ |
||
| 486 | public function getRedirectByRedirectSrcUrl(string $redirectSrcUrl, int $siteId = null) |
||
| 487 | { |
||
| 488 | // Query the db table |
||
| 489 | $query = (new Query()) |
||
| 490 | ->from(['{{%retour_static_redirects}}']) |
||
| 491 | ->where(['redirectSrcUrl' => $redirectSrcUrl]) |
||
| 492 | ; |
||
| 493 | if ($siteId) { |
||
| 494 | $query |
||
| 495 | ->andWhere(['siteId' => $siteId]) |
||
| 496 | ->orWhere(['siteId' => null]); |
||
| 497 | } |
||
| 498 | $redirect = $query->one(); |
||
| 499 | |||
| 500 | return $redirect; |
||
| 501 | } |
||
| 502 | |||
| 503 | /** |
||
| 504 | * Delete a redirect by id |
||
| 505 | * |
||
| 506 | * @param int $id |
||
| 507 | * |
||
| 508 | * @return int The result |
||
| 509 | */ |
||
| 510 | public function deleteRedirectById(int $id): int |
||
| 511 | { |
||
| 512 | $db = Craft::$app->getDb(); |
||
| 513 | // Delete a row from the db table |
||
| 514 | try { |
||
| 515 | $result = $db->createCommand()->delete( |
||
| 516 | '{{%retour_static_redirects}}', |
||
| 517 | [ |
||
| 518 | 'id' => $id, |
||
| 519 | ] |
||
| 520 | )->execute(); |
||
| 521 | } catch (Exception $e) { |
||
| 522 | Craft::error($e->getMessage(), __METHOD__); |
||
| 523 | $result = 0; |
||
| 524 | } |
||
| 525 | |||
| 526 | return $result; |
||
| 527 | } |
||
| 528 | |||
| 529 | /** |
||
| 530 | * Increment the retour_static_redirects record |
||
| 531 | * |
||
| 532 | * @param $redirectConfig |
||
| 533 | */ |
||
| 534 | public function incrementRedirectHitCount(&$redirectConfig) |
||
| 535 | { |
||
| 536 | if ($redirectConfig !== null) { |
||
| 537 | $db = Craft::$app->getDb(); |
||
| 538 | $redirectConfig['hitCount']++; |
||
| 539 | $redirectConfig['hitLastTime'] = Db::prepareDateForDb(new \DateTime()); |
||
| 540 | Craft::debug( |
||
| 541 | Craft::t( |
||
| 542 | 'retour', |
||
| 543 | 'Incrementing statistics for: {redirect}', |
||
| 544 | ['redirect' => print_r($redirectConfig, true)] |
||
| 545 | ), |
||
| 546 | __METHOD__ |
||
| 547 | ); |
||
| 548 | // Update the existing record |
||
| 549 | try { |
||
| 550 | $rowsAffected = $db->createCommand()->update( |
||
| 551 | '{{%retour_static_redirects}}', |
||
| 552 | [ |
||
| 553 | 'hitCount' => $redirectConfig['hitCount'], |
||
| 554 | 'hitLastTime' => $redirectConfig['hitLastTime'], |
||
| 555 | ], |
||
| 556 | [ |
||
| 557 | 'id' => $redirectConfig['id'], |
||
| 558 | ] |
||
| 559 | )->execute(); |
||
| 560 | Craft::debug('Rows affected: '.$rowsAffected, __METHOD__); |
||
| 561 | } catch (Exception $e) { |
||
| 562 | Craft::error($e->getMessage(), __METHOD__); |
||
| 563 | } |
||
| 564 | } |
||
| 565 | } |
||
| 566 | |||
| 567 | /** |
||
| 568 | * @param array $redirectConfig |
||
| 569 | */ |
||
| 570 | public function saveRedirect(array $redirectConfig) |
||
| 688 | } |
||
| 689 | |||
| 690 | /** |
||
| 691 | * Invalidate all of the redirects caches |
||
| 692 | */ |
||
| 693 | public function invalidateCaches() |
||
| 694 | { |
||
| 695 | $cache = Craft::$app->getCache(); |
||
| 696 | TagDependency::invalidate($cache, $this::GLOBAL_REDIRECTS_CACHE_TAG); |
||
| 703 | ); |
||
| 704 | } |
||
| 705 | |||
| 706 | /** |
||
| 707 | * @param $uri |
||
| 708 | * |
||
| 709 | * @return bool |
||
| 710 | */ |
||
| 711 | public function excludeUri($uri): bool |
||
| 722 | } |
||
| 723 | } |
||
| 724 |