/**
  * Constructor
  *
  * @param array $allowedMethods
  */
 public function __construct( array $allowedMethods = array() )
 {
     $this->allowedMethods = $allowedMethods;
     parent::__construct(
         "This method is not supported, allowed methods are: " . implode( ', ', $allowedMethods )
     );
 }
 /**
  * Constructs a new ezcMvcInvalidConfiguration exception for configuration $item
  *
  * @param string $item
  * @param mixed  $real
  * @param string $expected
  * @return void
  */
 function __construct($item, $real, $expected)
 {
     $type = gettype($real);
     if ($type == 'object') {
         $type = 'instance of class ' . get_class($real);
     }
     parent::__construct("The configuration returned an invalid object for '{$item}', {$expected} expected, but {$type} found.");
 }
 /**
  * Constructs an ezcMvcNamedRouteNotFoundException
  *
  * @param string $routeName
  */
 public function __construct($routeName)
 {
     $message = "No route was found with the name '{$routeName}'.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcMvcControllerException with $message
  *
  * @param string $message
  */
 public function __construct($message)
 {
     parent::__construct($message);
 }
Exemple #5
0
 /**
  * Constructs an ezcMvcNoRoutesException
  */
 public function __construct()
 {
     parent::__construct("No routes are defined in the router.");
 }
Exemple #6
0
 /**
  * Constructs an ezcMvcInvalidEncodingException
  *
  * @param string $string
  * @param string $encoding
  */
 public function __construct($string, $encoding)
 {
     parent::__construct("The string '{$string}' is invalid in character set '{$encoding}'.");
 }
Exemple #7
0
 /**
  * Constructs an ezcMvcNoZonesException
  */
 public function __construct()
 {
     parent::__construct("No zones are defined in the view.");
 }
 /**
  * Constructs an ezcMvcRouteNotFoundException
  *
  * @param ezcMvcRequest $request
  */
 public function __construct(ezcMvcRequest $request)
 {
     $id = $request->requestId != '' ? $request->requestId : $request->uri;
     $message = "No route was found that matched request ID '{$id}'.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcMvcFatalErrorLoopException
  *
  * @param ezcMvcRequest $request
  */
 public function __construct(ezcMvcRequest $request)
 {
     $id = "\"{$request->host}\", \"{$request->uri}\" ({$request->requestId})";
     parent::__construct("The request {$id} results in an infinite fatal error loop.");
 }
 /**
  * Constructs an ezcMvcFilterHasNoOptionsException
  *
  * @param string $filterClass
  */
 public function __construct($filterClass)
 {
     parent::__construct("The filter '{$filterClass}' does not support options.");
 }
 /**
  * Constructs an ezcMvcActionNotFoundException
  *
  * @param string $action
  */
 public function __construct($action)
 {
     $message = "The action '{$action}' does not exist.";
     parent::__construct($message);
 }
Exemple #12
0
 /**
  * Constructs an ezcMvcInfiniteLoopException
  *
  * @param int $redirectCount
  */
 public function __construct($redirectCount)
 {
     $message = "{$redirectCount} redirects have occurred, there is a possible infinite redirect loop.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcMvcNamedRouteNotReversableException
  *
  * @param string $routeName
  * @param string $routerClass
  */
 public function __construct($routeName, $routerClass)
 {
     $message = "The route with name '{$routeName}' is of the '{$routerClass}' class, which does not support reversed route generation.";
     parent::__construct($message);
 }
 /**
  * Constructs an ezcMvcMissingRouteArgumentException
  *
  * @param string $pattern
  * @param string $argument
  */
 public function __construct($pattern, $argument)
 {
     $message = "The argument '{$argument}' was not specified while generating a URL out of the route with pattern '{$pattern}'.";
     parent::__construct($message);
 }