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. |
Результат | Platformsh\Client\Model\Environment[] | The user's environments. |
/** * 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)); }