getEnvironments() public method

Return the user's environments.
public getEnvironments ( Platformsh\Client\Model\Project $project, boolean | null $refresh = null, boolean $events = true ) : Platformsh\Client\Model\Environment[]
$project Platformsh\Client\Model\Project The project.
$refresh boolean | null Whether to refresh the list.
$events boolean Whether to update Drush aliases if the list changes.
return Platformsh\Client\Model\Environment[] The user's environments.
コード例 #1
0
 /**
  * Get a list of environment IDs.
  *
  * @return string[]
  */
 public function getEnvironments()
 {
     $project = $this->getProject();
     if (!$project) {
         return [];
     }
     return array_keys($this->api->getEnvironments($project, false, false));
 }