Knp\Bundle\KnpBundlesBundle\Finder\Github::fetchRepositoryApi PHP Method

fetchRepositoryApi() protected method

protected fetchRepositoryApi ( $repositoryApi, $query )
    protected function fetchRepositoryApi($repositoryApi, $query)
    {
        $repositories = array();
        $page = 1;
        // Doesn't fetch more than 1000 results because github doesn't authorize this trick
        // Notice that the crawling as an identical result
        do {
            $repositoriesData = $repositoryApi->find($query, array('language' => 'php', 'per-page' => 100, 'start_page' => $page));
            $repositoriesData = $repositoriesData['repositories'];
            foreach ($repositoriesData as $repositoryData) {
                $repositories[] = $this->extractUrlRepository($repositoryData['url']);
            }
            $page++;
        } while (!empty($repositoriesData) && $page < 10);
        return $repositories;
    }