Webiny\Component\Router\Router::initialize PHP Метод

initialize() публичный Метод

Note: this method is called automatically when you do Router::setConfig().
public initialize ( )
    public function initialize()
    {
        // check if we have already initialized the router
        if ($this->initializedFlag) {
            return;
        }
        // do initialization
        $this->loader = new ConfigLoader(self::getConfig()->get('Routes', new ConfigObject([])));
        self::$routeCollection = $this->loader->getRouteCollection();
        $this->urlMatcher = new UrlMatcher();
        $this->urlGenerator = new UrlGenerator();
        $this->setCache(self::getConfig()->get('Cache', false));
        $this->initializedFlag = true;
        //print_r(Router::getConfig()->toArray());
    }