src/PlatformClient.php
public function getProject($id, $hostname = null, $https = true)
    {
        // Search for a project in the user's project list.
        foreach ($this->getProjects() as $project) {
            if ($project->id === $id) {
                return $project;
            }
        }

        // Look for a project directly if the hostname is known.
        if ($hostname !== null) {
            return $this->getProjectDirect($id, $hostname, $https);
        }

        // Use the project locator.
        if ($url = $this->locateProject($id)) {
            return Project::get($url, null, $this->connector->getClient());
        }

        return false;
    }
public function getProject($id, $hostname = null, $https = true)
    {
        // Search for a project in the user's project list.
        foreach ($this->getProjects() as $project) {
            if ($project->id === $id) {
                return $project;
            }
        }

        // Look for a project directly if the hostname is known.
        if ($hostname !== null) {
            return $this->getProjectDirect($id, $hostname, $https);
        }

        // Use the project locator.
        if ($url = $this->locateProject($id)) {
            return Project::get($url, null, $this->connector->getClient());
        }

        return false;
    }
public function getProject ( $ id , $ hostname = null , $ https = true ) { // Search for a project in the user's project list. foreach ( $ this -> getProjects ( ) as $ project ) { if ( $ project -> id === $ id ) { return $ project ; } } // Look for a project directly if the hostname is known. if ( $ hostname !== null ) { return $ this -> getProjectDirect ( $ id , $ hostname , $ https ) ; } // Use the project locator. if ( $ url = $ this -> locateProject ( $ id ) ) { return Project :: get ( $ url , null , $ this -> connector -> getClient ( ) ) ; } return false ; }
Get a single project by its ID.

@param string $id
@param string $hostname
@param bool   $https

@return Project|false
Get a single project by its ID .