ICanBoogie/HTTP v2.4.0
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Exception
    • HTTP
      • Dispatcher
      • Headers
      • Request

Classes

  • ICanBoogie\Exception\RescueEvent
  • ICanBoogie\HTTP\CallableDispatcher
  • ICanBoogie\HTTP\Dispatcher
  • ICanBoogie\HTTP\Dispatcher\BeforeDispatchEvent
  • ICanBoogie\HTTP\Dispatcher\DispatchEvent
  • ICanBoogie\HTTP\File
  • ICanBoogie\HTTP\FileInfo
  • ICanBoogie\HTTP\FileList
  • ICanBoogie\HTTP\Headers
  • ICanBoogie\HTTP\Headers\CacheControl
  • ICanBoogie\HTTP\Headers\ContentDisposition
  • ICanBoogie\HTTP\Headers\ContentType
  • ICanBoogie\HTTP\Headers\Date
  • ICanBoogie\HTTP\Headers\Header
  • ICanBoogie\HTTP\Headers\HeaderParameter
  • ICanBoogie\HTTP\Helpers
  • ICanBoogie\HTTP\RedirectResponse
  • ICanBoogie\HTTP\Request
  • ICanBoogie\HTTP\Request\Context
  • ICanBoogie\HTTP\Response
  • ICanBoogie\HTTP\Status
  • ICanBoogie\HTTP\WeightedDispatcher

Interfaces

  • ICanBoogie\HTTP\DispatcherInterface
  • ICanBoogie\HTTP\Exception

Exceptions

  • ICanBoogie\HTTP\DispatcherNotDefined
  • ICanBoogie\HTTP\ForceRedirect
  • ICanBoogie\HTTP\MethodNotSupported
  • ICanBoogie\HTTP\NotFound
  • ICanBoogie\HTTP\ServiceUnavailable
  • ICanBoogie\HTTP\StatusCodeNotValid
 1 <?php
 2 
 3 /*
 4  * This file is part of the ICanBoogie package.
 5  *
 6  * (c) Olivier Laviale <olivier.laviale@gmail.com>
 7  *
 8  * For the full copyright and license information, please view the LICENSE
 9  * file that was distributed with this source code.
10  */
11 
12 namespace ICanBoogie\HTTP;
13 
14 use ICanBoogie\Accessor\AccessorTrait;
15 
16 /**
17  * Exception thrown in attempt to obtain a dispatcher that is not defined.
18  *
19  * @property-read string $dispatcher_id The identifier of the dispatcher.
20  */
21 class DispatcherNotDefined extends \LogicException implements Exception
22 {
23     use AccessorTrait;
24 
25     private $dispatcher_id;
26 
27     protected function get_dispatcher_id()
28     {
29         return $this->dispatcher_id;
30     }
31 
32     public function __construct($dispatcher_id, $message = null, $code = 500, \Exception $previous = null)
33     {
34         $this->dispatcher_id = $dispatcher_id;
35 
36         if (!$message)
37         {
38             $message = \ICanBoogie\format("The dispatcher %dispatcher_id is not defined.", [
39 
40                 'dispatcher_id' => $dispatcher_id
41 
42             ]);
43         }
44 
45         parent::__construct($message, $code, $previous);
46     }
47 }
48 
ICanBoogie/HTTP v2.4.0 API documentation generated by ApiGen