missing_route.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  11. * @link https://cakephp.org CakePHP(tm) Project
  12. * @since 0.10.0
  13. * @license https://opensource.org/licenses/mit-license.php MIT License
  14. * @var \Cake\Core\Exception\CakeException $error
  15. */
  16. use Cake\Error\Debugger;
  17. use Cake\Routing\Router;
  18. $this->layout = 'dev_error';
  19. $this->assign('title', 'Missing Route');
  20. $this->assign('templateName', 'missing_route.php');
  21. $attributes = $error->getAttributes();
  22. $this->start('subheading');
  23. ?>
  24. <strong>Error</strong>
  25. <?= h($error->getMessage()); ?>
  26. <?php $this->end() ?>
  27. <?php $this->start('file') ?>
  28. <p>None of the currently connected routes match the provided parameters.
  29. Add a matching route to <?= 'config' . DIRECTORY_SEPARATOR . 'routes.php' ?></p>
  30. <?php if (!empty($attributes['context'])): ?>
  31. <p>The passed context was:</p>
  32. <div class="cake-debug">
  33. <?= Debugger::exportVar($attributes['context']); ?>
  34. </div>
  35. <?php endif; ?>
  36. <h3>Connected Routes</h3>
  37. <table cellspacing="0" cellpadding="0" width="100%">
  38. <tr><th>Template</th><th>Defaults</th><th>Options</th></tr>
  39. <?php foreach (Router::routes() as $route): ?>
  40. <tr>
  41. <td><?= h($route->template) ?></td>
  42. <td><div class="cake-debug" data-open-all="true"><?= Debugger::exportVar($route->defaults) ?></div></td>
  43. <td><div class="cake-debug" data-open-all="true"><?= Debugger::exportVar($route->options) ?></div></td>
  44. </tr>
  45. <?php endforeach; ?>
  46. </table>
  47. <?php $this->end() ?>