ActionException.php 458 B

123456789101112
  1. <?php
  2. declare(strict_types=1);
  3. class Minz_ActionException extends Minz_Exception {
  4. public function __construct(string $controller_name, string $action_name, int $code = self::ERROR) {
  5. // Just for security, as we are not supposed to get non-alphanumeric characters.
  6. $action_name = rawurlencode($action_name);
  7. $message = "Invalid action name “{$action_name}” for controller “{$controller_name}”.";
  8. parent::__construct($message, $code);
  9. }
  10. }