PHP Trait Pantheon\Terminus\Site\SiteAwareTrait

Exibir arquivo Open project: pantheon-systems/terminus

Protected Properties

Property Type Description
$sites Pantheon\Terminus\Collections\Sites

Public Methods

Method Description
getOptionalSiteEnv ( string $site_env_id ) : array Get the site and environment with the given ids, if provided
getSite ( Site $site_id ) : mixed Look up a site by id.
getSiteEnv ( string $site_env_id, string $default_env = null ) : array Get the site and environment with the given ids.
setSites ( Sites $sites ) *
sites ( ) : Sites

Method Details

getOptionalSiteEnv() public method

Get the site and environment with the given ids, if provided
public getOptionalSiteEnv ( string $site_env_id ) : array
$site_env_id string The site/environment id in the form [[.]]
return array The site and environment in an array, if provided; may return [null, null]

getSite() public method

Look up a site by id.
public getSite ( Site $site_id ) : mixed
$site_id Pantheon\Terminus\Models\Site Either a site's UUID or its name
return mixed

getSiteEnv() public method

Get the site and environment with the given ids.
public getSiteEnv ( string $site_env_id, string $default_env = null ) : array
$site_env_id string The site/environment id in the form [.]
$default_env string The default environment to use if none is specified
return array The site and environment in an array.

setSites() public method

*
public setSites ( Sites $sites )
$sites Pantheon\Terminus\Collections\Sites

sites() public method

public sites ( ) : Sites
return Pantheon\Terminus\Collections\Sites The sites collection for the authenticated user.

Property Details

$sites protected_oe property

protected Sites,Pantheon\Terminus\Collections $sites
return Pantheon\Terminus\Collections\Sites