PHP Interface Pantheon\Terminus\Site\SiteAwareInterface

Show file Open project: pantheon-systems/terminus

Public Methods

Method Description
getOptionalSiteEnv ( string $site_env_id ) : array Get the site and environment with the given ids if provided
getSite ( $site_id ) : mixed Look up a site by id.
getSiteEnv ( string $site_env_id, string $default_env ) : 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_id ) : mixed
$site_id
return mixed

getSiteEnv() public method

Get the site and environment with the given ids.
public getSiteEnv ( string $site_env_id, string $default_env ) : array
$site_env_id string The site/environment id in the form [.]
$default_env string The default environment to use if none is specified; null if not required
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.