Route construct chain start

@param string $name The route name
@param array  $data Meta data fo the route

@return Route
437672
protected function createRoute($name, array $data)
    {
        $route = $this->map->route($name, $data['path']);
        $allows = array_key_exists('allows', $data)
            ? $data['allows']
            : [];
        $method = ['GET'];
        if (array_key_exists('method', $data)) {
            $method = [$data['method']];
        }
        $route->allows(array_merge($allows, $method));
        return $this->setRouteProperties($route, $data);
    }
1285936
public function createFromArray(array $data, $name = null)
    {
        $preloadOids = $itemList = array();
        $menu        = $this->_createFromArray($data, $name, $itemList, $preloadOids);

        if ($preloadOids && $this->aclProvider) {
            //preload all acls for menu items
            try {
                $this->aclProvider->findAcls($preloadOids);
            } catch(AclNotFoundException $e) {
            }
        }

        foreach ($itemList as $item) {
            $this->setContext($item[0], $item[1], $item[2]);
        }

        return $menu;
    }
123799
public function route($name = ''){
        $routes = AsCollector::getAs();

        if (isset($routes[$name])) {
            $this->to($routes[$name]);
        }else{
            throw new RouteNotFoundException(sprintf('%s Route Not Found'));
        }
    }
1018390
public function createPackage($name, array $data = array())
    {
        if (isset($this->packages[strtolower($name)])) {
            throw new \InvalidArgumentException(sprintf('The package "%s" already exists.', $name));
        }

        return $this->packages[strtolower($name)] = new PackageNode($name, $data);
    }
1174512
public function create($routeName, array $data = array(), array $query = array())
    {
        if(strpos($routeName, '@') === 0)
            $route = $this->rootRouter->findRoute(substr($routeName, 1));
        else
            $route = $this->map->findRoute($routeName);

        if(!$route)
            throw new NotFoundException('Unable to find route ['.$routeName.']');

        $path = $route->getAbsolutePath($data);

        return $this->base($path).($query ? '?'. http_build_query($query) : null);
    }
691261
public static function createFromArray($name, array $data = [])
    {
        $type = parent::createFromArray($name, $data);
        \assert($type instanceof self);

        $type->json = $data;

        return $type;
    }
1052594
public function oneNamed(string $name): ?Route
    {
        if (!array_key_exists($name, $this->named)) {
            return null;
        }

        return $this->named[$name];
    }
128036
public function extend($name, $data = []) {
        foreach ((array)$name as $item) {
            echo $this->factory->getView($this->getExtendFile($item))
                ->renderWithData($data);
        }
        return $this;
    }
340943
public function jumpTo($name)
    {
        $this->action = self::NODE_ACTION_JUMP_TO;
        $this->data['nodeName'] = $name;
        return $this;
    }
553323
public function view(string $name, array $data = [])
    {
        return $this->add(View::create($name, $data));
    }
1369502
public function create(
        string $method,
        string $definition,
        RequestHandlerInterface $handler,
        ?string $name,
        $data
    ): Route {
        if (!Method::isValid($method)) {
            throw InvalidRoute::invalidMethod($method);
        }

        $path = $this->parser->parse($definition, $this->types);

        return new Route($method, $path, $handler, $name, $data);
    }
352672
public static function buildFeature($name, array $data = array())
    {
        $values = [];

        $value = null;
        if (isset($data['values'])) {
            foreach ($data['values'] as $value) {

                $filter = $isFeature = null;
                if (isset($value['filters']) && !empty($value['filters'])) {
                    $filter = self::buildFilterBag($value['filters']);
                }
                if (isset($value['is_feature'])) {
                    $isFeature = (bool) $value['is_feature'];
                }

                $values[] = new Value($value['value'], $filter, $isFeature);
            }
            $value = new ValueBag($values);
        }

        $filter = null;
        if (isset($data['filters']) && !empty($data['filters'])) {
            $filter = self::buildFilterBag($data['filters']);
        }

        $breaker = null;
        if (isset($data['breaker']) && !empty($data['breaker'])) {
            $breaker = self::buildFilterBag($data['breaker']);
        }

        $feature = new Feature($name, $filter, $breaker, $value);

        if (isset($data['enabled']) && !$data['enabled']) {
            $feature->setEnabled(false);
        }

        return $feature;
    }
822947
public function addRouteFromArray($name, array $routeArray)
    {
        $route = \Parable\Routing\Route::createFromDataArray($routeArray);
        $route->setName($name);

        $this->addRoute($name, $route);

        return $this;
    }
1215878
public function create(string $name, string $data, array $labels = [], array $drive = [], array $templating = [])
    {
        $data = array_filter([
            'Name' => $name,
            'Labels' => $labels,
            'Data' => $data,
            'Drive' => $drive,
            'Templating' => $templating,
        ]);

        $url = self::$base_url.'/create';

        return self::$curl->post($url, json_encode($data), self::HEADER);
    }
1015834
public function make(string $name, array $data = [], \Closure $callback = null)
    {
        $this->setWidgetName($name);
        $this->data = $data;
        /*
         | If second param given as closure then we will
         | return callback
         */
        if (!is_null($callback) && $callback instanceof \Closure) {
            return $callback($this);
        }

        /*
         | return object
         */
        return $this->render();
    }
1326458
public function route($name, $domain = null)
    {
        $this->routes[$name] = clone $this->protoRoute;
        $this->routes[$name]->name($name);
        if (isset($domain)) {
            $this->routes[$name]->domain($domain);
        }
        return $this->routes[$name];
    }
592962
public function append(string $name, $data)
  {
    return Filesystem::append(self::url($name), $data, FILE_APPEND);
  }