ZF\Console\Application::setRoutes PHP 메소드

setRoutes() 보호된 메소드

Allows specifying an array of routes, which may be mixed Route instances or array specifications for creating routes.
protected setRoutes ( array | Traversabl\Traversable $routes ) : self
$routes array | Traversabl\Traversable
리턴 self
    protected function setRoutes($routes)
    {
        foreach ($routes as $route) {
            if ($route instanceof Route) {
                $this->routeCollection->addRoute($route);
                continue;
            }
            if (is_array($route)) {
                $this->routeCollection->addRouteSpec($route);
                $this->mapRouteHandler($route);
                continue;
            }
        }
        return $this;
    }