Get the project docs and files.

@return \Illuminate\Http\Collection
546993
public function vault()
    {
        $vault = collect($this->dock)->where('name', 'vault')->first();
        $vault->bucket = $this;
        return new Vault($vault);
    }
831688
public function retrieveAll()
    {
        $adapterCollection = new MetaDataSourceCollection();

        foreach ($this->fileManager->glob(Installer::BASE_PATH . self::SOURCE_PATH . '*' . self::EXTENSION) as $file) {
            // Decode
            $config = $this->transtyper->decode($this->fileManager->fileGetContent($file));
            // Validate
            try {
                $this->arrayValidator->isValid('CrudGenerator\Metadata\MetaDataSource', $config);
            } catch (ValidationException $e) {
                continue; // Do nothing
            }

            // Hydrate
            $adapter = $this->metaDataSourceHydrator->adapterNameToMetaDataSource(
                $config[MetaDataSource::METADATA_DAO_FACTORY]
            );

            $adapter->setMetadataDaoFactory($config[MetaDataSource::METADATA_DAO_FACTORY]);
            $adapter->setMetadataDao($config[MetaDataSource::METADATA_DAO]);

            // Test if have a config
            if (isset($config[MetaDataSource::CONFIG]) === true) {
                $adapter->setConfig($this->driverHydrator->arrayToDto($config[MetaDataSource::CONFIG]));
            }

            $adapterCollection->append($adapter);
        }

        return $adapterCollection;
    }
1341452
public function getProjectInfo(){
		$pjInfo = json_decode('{}');
		$page_info = $this->page_path;
		if(!$page_info){
			$page_info = '/px2me-dummy.html';
		}
		$px2query_options = array(
			"output" => "json",
		);

		$allData = $this->px2query($page_info.'?PX=px2dthelper.get.all', $px2query_options);

		if( @is_object($allData) && @is_object($allData->config) ){
			$pjInfo->conf = $allData->config;
			$pjInfo->pageInfo = $allData->page_info;
			$pjInfo->contRoot = $allData->path_controot;
			$pjInfo->documentRoot = $allData->realpath_docroot;
			$pjInfo->realpathFiles = $allData->realpath_files;
			$pjInfo->pathFiles = $allData->path_files;
			$pjInfo->realpathDataDir = $allData->realpath_data_dir;
			$pjInfo->pathResourceDir = $allData->path_resource_dir;
			$pjInfo->realpath_homedir = $allData->realpath_homedir;
			$pjInfo->packages = $allData->packages;
			return $pjInfo;
		}

		$pjInfo->conf = $this->px2query($page_info.'?PX=api.get.config', $px2query_options);

		$pjInfo->pageInfo = $this->px2query($page_info.'?PX=api.get.page_info', $px2query_options);

		$pjInfo->documentRoot = $this->px2query($page_info.'?PX=api.get.realpath_docroot', $px2query_options);

		$realpathDataDir = $this->px2query($page_info.'?PX=api.get.realpath_files', $px2query_options);
		$realpathDataDir = $this->fs->get_realpath( './guieditor.ignore/', $realpathDataDir );
		$pjInfo->realpathDataDir = $realpathDataDir;

		$pathResourceDir = $this->px2query($page_info.'?PX=api.get.path_files', $px2query_options);

		$pathResourceDir = $this->fs->get_realpath('resources/', $pathResourceDir);
		$pathResourceDir = $this->fs->normalize_path($pathResourceDir);
			// Windows でボリュームラベル "C:" などが含まれるようなパスを渡すと、
			// broccoli-html-editor内 resourceMgr で
			// 「Uncaught RangeError: Maximum call stack size exceeded」が起きて落ちる。
			// ここで渡すのはウェブ側からみえる外部のパスでありサーバー内部パスではないので、
			// ボリュームラベルが付加された値を渡すのは間違い。

		$pjInfo->pathResourceDir = $pathResourceDir;

		return $pjInfo;
	}
112573
public function getProjectDir()
    {
        if (null === $this->projectDir) {
            $r = new \ReflectionObject($this);
            $dir = $rootDir = \dirname($r->getFileName());
            while (!file_exists($dir.'/composer.json')) {
                if ($dir === \dirname($dir)) {
                    return $this->projectDir = $rootDir;
                }
                $dir = \dirname($dir);
            }
            $this->projectDir = $dir;
        }

        return $this->projectDir;
    }
506858
private function getFilenames()
    {
        $files = [];

        foreach ($this->filesets as $fileset) {
            $ds = $fileset->getDirectoryScanner($this->project);
            $ds->scan();

            $includedFiles = $ds->getIncludedFiles();

            foreach ($includedFiles as $file) {
                $fs = new PhingFile(basename($ds->getBaseDir()), $file);

                $files[] = $fs->getAbsolutePath();
            }
        }

        return $files;
    }
1253988
public function getAllDocuments(): array
    {
        $documents = [];

        foreach ($this->filesystem->listContents('/'.$this->path) as $info) {
            $id = $info['filename'];

            if ($this->hasDocument($id)) {
                $documents[$id] = $this->getDocument($id);
            }
        }

        return $documents;
    }
534065
public function getAvailableResources()
    {
        $cache = Cache::getTransientCache();
        $cacheId = 'transifex_resources_' . $this->projectSlug;
        $resources = $cache->fetch($cacheId);

        if (empty($resources)) {
            $apiPath = 'project/' . $this->projectSlug . '/resources';
            $resources = $this->getApiResults($apiPath);
            $cache->save($cacheId, $resources);
        }

        return $resources;
    }
1070026
public function getAll()
    {
        $query = 'SELECT * FROM `project` ORDER BY `title` ASC';
        $stmt = Database::getConnection('read')->prepare($query);

        if ($stmt->execute()) {
            $res = $stmt->fetchAll(\PDO::FETCH_ASSOC);

            $map = function ($item) {
                return new Project($item);
            };
            $rtn = array_map($map, $res);

            $count = count($rtn);


            return array('items' => $rtn, 'count' => $count);
        } else {
            return array('items' => array(), 'count' => 0);
        }
    }
1251231
protected function getFiles()
    {
        if ($this->isSiteDeployment) {
            if ($this->deviceView != 'main' && !is_dir("{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$this->deviceView}")) {
                $this->deviceView = 'main';
            }

            if ($this->design != 'default' && !is_dir("{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$this->deviceView}/{$this->design}")) {
                $this->design = 'default';
            }
        }

        $list = array();
        if (!empty($this->viewDirectory))
            $list[] = $this->viewDirectory;

        $files = array();

        $list = array_merge($this->ApplicationContext->getEnabledPluginDirectories(), $list);

        if (count($list) > 0) {
            krsort($list);
            $pattern = $this->subject.'.php';

            foreach ($list as $tp) {
                if (is_dir($tp)) {
                    $paths = $this->getPathsToCheck($tp, $pattern);
                    krsort($paths);

                    foreach ($paths as $path) {
                        $this->Logger->debug('Checking ['.$path.']...');
                        if (file_exists($path)) {
                            $this->Logger->debug('Found ['.$path.']');
                            $files[] = $path;
                            break;
                        }
                    }
                } else {
                    $this->Logger->warn('Directory does not exist: '.$tp);
                }
            }

            /*
             * special case handling for routes and redirects.  the domain, device and design
             * specific routes should be included last.  this is so the design can set routes
             * but still inherit the routes from the domain.
             *
             * this SEEMS wrong but the route patterns are the ID in the array so the last
             * route definition wins for a given pattern.
             *
             * order of includes
             * - all routes|redirects from enabled plugins
             * - app/view/context/domain/routes|redirects.php
             * - app/view/context/domain/deviceView/default/routes|redirects.php
             * - app/view/context/domain/deviceView/design/routes|redirects.php
             *
             * the array key is the ID and that IS the pattern, so last key wins.
             * This is not "great" but changing the router is a much bigger problem
             * and this is a little better than what exists now.
             *
             */
            if ('routes' === $this->subject || 'redirects' === $this->subject) {
                $path = "{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$this->subject}.php";
                if (file_exists($path)) {
                    $this->Logger->debug('Found ['.$path.']');
                    $files[] = $path;
                }

                if ($this->design != 'default') {
                    $path = "{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$this->deviceView}/default/{$this->subject}.php";
                    if (file_exists($path)) {
                        $this->Logger->debug('Found ['.$path.']');
                        $files[] = $path;
                    }
                }

                $path = "{$this->viewDirectory}/{$this->context}/{$this->siteDomain}/{$this->deviceView}/{$this->design}/{$this->subject}.php";
                if (file_exists($path)) {
                    $this->Logger->debug('Found ['.$path.']');
                    $files[] = $path;
                }
            }

            if (empty($files))
                return array(array(), null);

            $timestamps = array();
            foreach ($files as $filename)
                $timestamps[] = filemtime($filename);

            $md5 = md5(serialize(array($files, $timestamps, filemtime(__FILE__))));

            return array($files, $md5);
        }

        throw new Exception('No active themes or plugins.');
    }
715693
protected function getCompiledFiles()
    {
        if ($this->app && class_exists('Illuminate\Foundation\Console\OptimizeCommand')) {
            $reflector = new \ReflectionClass('Illuminate\Foundation\Console\OptimizeCommand');
            $path = dirname($reflector->getFileName()) . '/Optimize/config.php';

            if (file_exists($path)) {
                $app = $this->app;
                $core = require $path;
                return array_merge($core, $app['config']['compile']);
            }
        }
        return [];
    }
311240
public function getPackages() : PackageCollection
    {
        if (null === $this->packages) {
            $packages = array_merge(
                array(
                    $this->getName() => $this,
                ),
                $this->getInstalledPackagesFile()->getPackages()->toArray()
            );

            $this->packages = new PackageCollection($packages);
        }

        return $this->packages;
    }
490688
protected function getAllFiles(){
        $core = require __DIR__. '/Optimize/core.php';

        $proivers = config('compile.providers');
        $aliases   = config('compile.aliases');
        $files = array_merge($core, $proivers, $aliases);

        return $files;
    }
120078
public function getProject()
    {
        $key = $this->getProjectId();

        if (empty($key)) {
            return null;
        }

        $cacheKey   = 'Cache.Project.' . $key;
        $rtn        = $this->cache->get($cacheKey, null);

        if (empty($rtn)) {
            $rtn    = Factory::getStore('Project', 'PHPCI')->getById($key);
            $this->cache->set($cacheKey, $rtn);
        }

        return $rtn;
    }
1164688
protected function getPatchCollection()
    {
        if ($this->patchCollection === null) {
            $patchCollector = $this->getPatchCollector();
            $packages = $this->getLocalRepositoryPackages(true);
            $this->patchCollection = $patchCollector->collectPatches($this->composer->getPackage(), $packages);
        }

        return $this->patchCollection;
    }
1308322
protected function doCall()
    {
        $this->resolveOptions();
        $this->request = $this->createRequest();
        $this->response = $this->client->send($this->request);

        return $this->generateResponse($this->response);
    }
689666
public function getResources()
    {
        $data = $this->executeJson(sprintf('project/%s/resources/', $this->ensureParameter('slug')));

        $resources = array();
        foreach ($data as $entry) {
            $resource = new TranslationResource($this->getTransport());
            $resource->setProject($this);
            $resource->setFromResult($entry);
            $resources[$resource->getSlug()] = $resource;
        }

        return $resources;
    }
875892
public function getData()
    {
        if (empty($this->data)) {
            $this->data = [
                'project' => $this->getComposerData()->name
            ];
            $this->data = array_merge($this->data, $this->getAuthor());
        }
        return $this->data;
    }