示例#1
0
 /**
  * Route constructor.
  * @param RouteCollection $routeCollection
  * @param string $method
  * @param string $path
  * @param string|callable $action
  * @param array $options
  */
 public function __construct(RouteCollection $routeCollection, $method, $path, $action, array $options = [])
 {
     parent::__construct($options);
     $this->setParent($routeCollection);
     $this->method = $method;
     $this->path = $path;
     $this->action = $action;
 }
 /**
  * RouteCollection constructor.
  * @param array $options
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->routes = [];
     $this->children = [];
 }