@param string              $name
@param PaginationInterface $pagination
@param array               $extList

@return array
420769
private function getExtList($name, PaginationInterface $pagination, array $extList = [])
    {
        $ext = $this->extensionRegistry->getExtension($name);
        $deps = $ext->getDependency();
        foreach ($deps as $dep) {
            $extList = $this->getExtList($dep, $pagination, $extList);
        }
        if ($ext->supportPagination($pagination)) {
            $extList[$name] = $ext;
        }

        return $extList;
    }
213016
public function forEachNamed($name, callable $callable)
    {
        Types::assert(['string' => [$name]]);

        $name = strtolower($name);

        if (isset($this->headers[$name]))
        {
            foreach ($this->headers[$name] as $header)
            {
                $callable($header);
            }
        }
    }
1371366
public function createLink($name, array $defaultRouteParams = array(), array $extra = array())
    {
        $options = $this->getLinkOptions($name);
        $factory = $this->createFactory($defaultRouteParams, $extra);

        return $factory->createItem($name, $options);
    }
1168652
public static function getArgumentsForCall($name, $arguments): array
    {
        // uppercase the method name
        $name = strtoupper($name);

        if ($name === 'ANY') {
            // allowed any of the methods
            $name = self::ALLOWED_METHODS;
        } else if (! in_array($name, self::ALLOWED_METHODS)) {
            throw new InvalidArgumentException('Route::method must be one of: ' . implode(', ', self::ALLOWED_METHODS));
        }

        // add the name to the arguments
        array_unshift($arguments, $name);

        // return the arguments
        return $arguments;
    }
1199936
public function findByGenericFilter($name, $filter = null, $page = 1, $orderColumn = null, $orderType = null) {
        $this->load();
        $mapper = MapperBuilder::buildFromName($this->mapping, $name);

        $selectQuery = "";
        $whereQuery = "";
        $orderQuery = "";

        $selectQuery .= "SELECT * FROM `" . $mapper->getTable() . "` ";
        $filterList = array();
        if (!is_null($filter)) {
            $filterList = explode(" ", $filter);
        }

        if (!is_null($filter)) {
            $whereQuery .= " WHERE 1=2 ";
            foreach ($filterList as $searchedWord) {
                foreach ($mapper->getFilter("generic")->getColumns() as $filteredColumn) {
                    $whereQuery .= " OR $filteredColumn LIKE '%" . $searchedWord . "%'";
                }
            }
        } else {
            $whereQuery .= " WHERE 1 ";
        }

        if (!is_null($orderColumn)) {
            $orderQuery .= "ORDER BY $orderColumn ";
            if (!is_null($orderType)) {
                $orderQuery .= "$orderType";
            } else {
                $orderQuery .= "ASC";
            }
        }

        $from = ($page - 1) * $mapper->getFilter("generic")->getItemsPerPage();
        $pageQuery = " LIMIT $from , " . $mapper->getFilter("generic")->getItemsPerPage();

        $query = $selectQuery . $whereQuery . $orderQuery . $pageQuery;
        $result = $this->getDataSource()->query($query);

        if ($result) {
            $collection = new Collection($mapper->getClass(), $result, $mapper);
        } else {
            $collection = new Collection($mapper->getClass(), array(), $mapper);
        }

        $selectCountQuery = "SELECT count(*) as total FROM `" . $mapper->getTable() . "` ";
        $query = $selectCountQuery . $whereQuery;
        $result = $this->getDataSource()->query($query);
        $itemCount = $result[0]["total"];
        $pager = new Pager($collection, $itemCount, $mapper->getFilter("generic")->getItemsPerPage(), $page);

        return $pager;
    }
1020034
private function setPaginationLink($name, $value)
    {
        if (! is_string($value) and ! is_null($value)) {
            throw new ValidationException('property "' . $name . '" has to be a string or null, "' . gettype($value) . '" given.');
        }

        // null is ignored
        if (! is_null($value)) {
            $this->set($name, strval($value));
        }
    }
46828
protected function getRequiredTemplateVariable($name)
    {
        if(!array_key_exists($name, $this->templateVars))
            throw new ControllerException('Required template variable ['.$name.'] is missing');

        return $this->templateVars[$name];
    }
524331
public function call(ExpandableInterface $object, $name, array $args)
    {
        if (!$this::exists($name)) {
            throw new \BadMethodCallException(sprintf(self::MSG_NO_EXTENSION_TOCALL, $name), 110);
        }
        
        $closure = $this->extensions->get($name);
        
        return call_user_func_array(\Closure::bind($closure, $object, get_class($object)), $args);
    }
455235
public function getPage(string $name): Page
    {
        if ($this->page_object_factory === null) {
            throw new RuntimeException('[W406] To create pages you need to pass a factory with setPageObjectFactory()');
        }

        return $this->page_object_factory->createPage($name);
    }
1130595
public function getRouteByName($name, $parameters = [])
    {
        $qb = $this->pageRepository->createQueryBuilder('p');
        $results = $qb
            ->select('p.route, p.controller, t.path, t.locale')
            ->join('p.translations', 't')
            ->andWhere($qb->expr()->eq('p.static', 0))
            ->andWhere($qb->expr()->eq('p.route', $qb->expr()->literal($name)))
            ->getQuery()
            ->getArrayResult()
        ;

        $routes = $this->transformResultsToRoutes($results);
        if (count($routes) == 1) {
            return current($routes);
        }

        return null;
    }
449816
protected function validateExtensionBlock($name, $callable, $type)
    {
        if (!is_string($name)) {
            throw new InvalidArgumentException(
                sprintf(
                    "Name argument for %s must be a string",
                    $type
                )
            );
        } elseif (!is_callable($callable)) {
            throw new InvalidArgumentException(
                sprintf(
                    "Callable %s argument named '%s' is not callable",
                    $type,
                    $name
                )
            );
        }
    }
732285
public function execute($row, $name = null)
    {
        parent::execute($row, $name);
        return $row[MemberNames::LINK_ID];
    }
147829
public function getLoader($name)
    {
        if (empty($this->loaders[$name]) || !($this->loaders[$name] instanceof LoaderInterface)) {
            $class = sprintf('Windwalker\\Language\\Loader\\%sLoader', ucfirst($name));

            if (!class_exists($class)) {
                throw new \DomainException('Format ' . $name . ' not support. Class: ' . $class . ' not found');
            }

            $this->loaders[$name] = new $class();
        }

        return $this->loaders[$name];
    }
16452
public function get($name)
    {
        if (!is_string($name)) {
            throw new \InvalidArgumentException(self::MSG_EXTENSION_NAME, 220);
        }
    
        if (!$this->offsetExists(strtolower($name))) {
            throw new \LogicException(sprintf(self::MSG_NO_EXTENSION_TOGET, $name), 221);
        }
        
        return parent::offsetGet(strtolower($name));
    }
618775
protected function getQueueId($name)
    {
        $r = $this->db->fetchColumn('select queue_id from Queues where queue_name = ? limit 1', [$name]);

        if ($r === false) {
            throw new RuntimeException(t('Queue does not exist: %s', $name));
        }

        $count = (int) $r;

        return $count;
    }
1129240
public function getExtension($name)
    {
        if (isset($this->extensions[$name])) {
            return $this->extensions[$name];
        }

        if (isset($this->extensionsByNs[$name])) {
            return $this->extensionsByNs[$name];
        }

        throw new LogicException(sprintf('Container extension "%s" is not registered', $name));
    }
545362
public function renderPager(Pagerfanta $pager, $name = null, array $options = [])
    {
        if (isset($options['routeParams']['grid']['reset'])) {
            unset($options['routeParams']['grid']);
        }

        return $this->pagerfantaExtension->renderPagerfanta($pager, $name, $options);
    }