Platformsh\Cli\Command\CommandBase::selectProject PHP Метод

selectProject() защищенный Метод

Select the project for the user, based on input or the environment.
protected selectProject ( string $projectId = null, string $host = null ) : Platformsh\Client\Model\Project
$projectId string
$host string
Результат Platformsh\Client\Model\Project
    protected function selectProject($projectId = null, $host = null)
    {
        if (!empty($projectId)) {
            $project = $this->api()->getProject($projectId, $host);
            if (!$project) {
                throw new \RuntimeException('Specified project not found: ' . $projectId);
            }
        } else {
            $project = $this->getCurrentProject();
            if (!$project) {
                throw new RootNotFoundException("Could not determine the current project." . "\nSpecify it manually using --project or go to a project directory.");
            }
        }
        return $project;
    }