Свойство | Тип | Описание | |
---|---|---|---|
$apiToken | string | null | ||
$apiTokenType | string | ||
$cache | |||
$client | Platformsh\Client\PlatformClient | ||
$config | |||
$dispatcher | null | Symfony\Component\EventDispatcher\EventDispatcherInterface | ||
$sessionId | string |
Метод | Описание | |
---|---|---|
__construct ( |
Constructor. | |
clearCache ( ) | Clear the cache. | |
clearEnvironmentsCache ( string $projectId ) | Clear the environments cache for a project. | |
clearProjectsCache ( ) | Clear the projects cache. | |
getAccount ( Platformsh\Client\Model\ProjectAccess $user, boolean $reset = false ) : array | Get a user's account info. | |
getCache ( ) : |
||
getClient ( boolean $autoLogin = true ) : Platformsh\Client\PlatformClient | Get the API client object. | |
getEnvironment ( string $id, Platformsh\Client\Model\Project $project, boolean | null $refresh = null, boolean $tryMachineName = false ) : Platformsh\Client\Model\Environment | false | Get a single environment. | |
getEnvironments ( Platformsh\Client\Model\Project $project, boolean | null $refresh = null, boolean $events = true ) : Platformsh\Client\Model\Environment[] | Return the user's environments. | |
getMyAccount ( boolean $reset = false ) : array | Get the current user's account info. | |
getNestedProperty ( Platformsh\Client\Model\Resource $resource, string $propertyPath, boolean $lazyLoad = true ) : mixed | Get a nested property of a resource, via a dot-separated string path. | |
getProject ( string $id, string | null $host = null, boolean | null $refresh = null ) : Platformsh\Client\Model\Project | false | Return the user's project with the given ID. | |
getProjectLabel ( Platformsh\Client\Model\Project $project, string | false $tag = 'info' ) : string | Returns a project label. | |
getProjects ( boolean | null $refresh = null ) : Platformsh\Client\Model\Project[] | Return the user's projects. | |
hasApiToken ( ) : boolean | Returns whether the CLI is authenticating using an API token. | |
isLoggedIn ( ) : boolean | ||
loadProjectAccessByEmail ( Platformsh\Client\Model\Project $project, string $email ) : Platformsh\Client\Model\ProjectAccess | false | Load a project user ("project access" record) by email address. | |
sortResources ( array &$resources, string $propertyPath ) : Platformsh\Client\Model\Resource[] | Sort resources. |
Метод | Описание | |
---|---|---|
getUserAgent ( ) : string | Get an HTTP User Agent string representing this application. | |
loadTokenFromFile ( string $filename ) : string | Load an API token from a file. | |
setUpCache ( ) |
public __construct ( |
||
$config | ||
$dispatcher | Symfony\Component\EventDispatcher\EventDispatcherInterface |
public clearEnvironmentsCache ( string $projectId ) | ||
$projectId | string |
public getAccount ( Platformsh\Client\Model\ProjectAccess $user, boolean $reset = false ) : array | ||
$user | Platformsh\Client\Model\ProjectAccess | |
$reset | boolean | |
Результат | array | An array containing 'email' and 'display_name'. |
public getCache ( ) : |
||
Результат |
public getEnvironment ( string $id, Platformsh\Client\Model\Project $project, boolean | null $refresh = null, boolean $tryMachineName = false ) : Platformsh\Client\Model\Environment | false | ||
$id | string | The environment ID to load. |
$project | Platformsh\Client\Model\Project | The project. |
$refresh | boolean | null | Whether to refresh the list of environments. |
$tryMachineName | boolean | Whether to retry, treating the ID as a machine name. |
Результат | Platformsh\Client\Model\Environment | false | The environment, or false if not found. |
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. |
public getMyAccount ( boolean $reset = false ) : array | ||
$reset | boolean | |
Результат | array | An array containing at least 'uuid', 'mail', and 'display_name'. |
public getProject ( string $id, string | null $host = null, boolean | null $refresh = null ) : Platformsh\Client\Model\Project | false | ||
$id | string | The project ID. |
$host | string | null | The project's hostname. |
$refresh | boolean | null | Whether to bypass the cache. |
Результат | Platformsh\Client\Model\Project | false |
public getProjectLabel ( Platformsh\Client\Model\Project $project, string | false $tag = 'info' ) : string | ||
$project | Platformsh\Client\Model\Project | |
$tag | string | false | |
Результат | string |
public getProjects ( boolean | null $refresh = null ) : Platformsh\Client\Model\Project[] | ||
$refresh | boolean | null | Whether to refresh the list of projects. |
Результат | Platformsh\Client\Model\Project[] | The user's projects, keyed by project ID. |
protected getUserAgent ( ) : string | ||
Результат | string |
public hasApiToken ( ) : boolean | ||
Результат | boolean |
public loadProjectAccessByEmail ( Platformsh\Client\Model\Project $project, string $email ) : Platformsh\Client\Model\ProjectAccess | false | ||
$project | Platformsh\Client\Model\Project | |
string | ||
Результат | Platformsh\Client\Model\ProjectAccess | false |
protected loadTokenFromFile ( string $filename ) : string | ||
$filename | string | A filename, either relative to the user config directory, or absolute. |
Результат | string |
public static sortResources ( array &$resources, string $propertyPath ) : Platformsh\Client\Model\Resource[] | ||
$resources | array | |
$propertyPath | string | |
Результат | Platformsh\Client\Model\Resource[] |
protected static string $apiTokenType | ||
Результат | string |
protected static CacheProvider,Doctrine\Common\Cache $cache | ||
Результат |
protected static PlatformClient,Platformsh\Client $client | ||
Результат | Platformsh\Client\PlatformClient |
protected null|EventDispatcherInterface,Symfony\Component\EventDispatcher $dispatcher | ||
Результат | null | Symfony\Component\EventDispatcher\EventDispatcherInterface |