CapMousse\ReactRestify\Routing\Router::__construct PHP 메소드

__construct() 공개 메소드

Create a new routing element
public __construct ( array $routes = [] ) : Router
$routes array a route array
리턴 Router
    public function __construct($routes = array())
    {
        if (!is_array($routes)) {
            throw new \InvalidArgumentException("Routes must be an array");
        }
        $this->addRoutes($routes);
    }