/** * * @param DF_Web_Routing_Action_Chained $endpoint */ public function __construct($endpoint) { if (!$endpoint instanceof DF_Web_Routing_Action_Chained) { throw new DF_Error_InvalidArgumentException("endpoint", $endpoint, DF_Web_Routing_Action_Chained); } if (!$endpoint->is_endpoint()) { throw new DF_Web_Exception("Not an endpoint: {$endpoint}"); } $this->endpoint = $endpoint; $this->chain[] = $endpoint; }
*/ protected function has_config_chained($config) { if ($config->has('chained')) { return true; } return false; } public function is_chained_root() { return $this->is_chained_root; } public function is_endpoint() { if ($this->get_args()) { return true; } return false; } public function __toString() { $parent = parent::__toString(); $chained = $this->chained; $captures = $this->captures; $root_chained = $this->is_chained_root ? "Root chained" : "Chained"; $str = "{$parent}, {$root_chained}: {$chained}, Captures: {$captures}"; return $str; } } DF_Web_Routing_Action_Chained::$LOGGER = DF_Web_Logger::logger('DF_Web_Routing_Action_Chained');