PHP Class Pantheon\Terminus\Models\User

Inheritance: extends TerminusModel, implements Robo\Contract\ConfigAwareInterface, implements League\Container\ContainerAwareInterface, use trait Robo\Common\ConfigAwareTrait, use trait League\Container\ContainerAwareTrait
Show file Open project: pantheon-systems/terminus Class Usage Examples

Protected Properties

Property Type Description
$aliases stdClass
$machine_tokens Pantheon\Terminus\Collections\PaymentMethods
$org_memberships Pantheon\Terminus\Collections\UserOrganizationMemberships
$payment_methods Pantheon\Terminus\Collections\PaymentMethods
$site_memberships Pantheon\Terminus\Collections\UserSiteMemberships
$ssh_keys Pantheon\Terminus\Collections\SSHKeys
$workflows Pantheon\Terminus\Collections\Workflows

Public Methods

Method Description
__construct ( object $attributes = null, array $options = [] ) Object constructor
dashboardUrl ( ) : string Provides Pantheon Dashboard URL for this user
getAliases ( ) : string Retrieves Drush aliases for this user
getMachineTokens ( ) : Terminus\Collections\PaymentMethods
getName ( ) : string Get the user's full name.
getOrgMemberships ( ) : Terminus\Collections\UserOrganizationMemberships
getOrganizations ( ) : Organization[] Retrieves organization data for this user
getPaymentMethods ( ) : PaymentMethods
getProfile ( ) : object
getSSHKeys ( ) : Terminus\Collections\SSHKeys
getSiteMemberships ( ) : Terminus\Collections\UserSiteMemberships
getSites ( ) : Site[] Requests API data and returns an object of user site data
getUpstreams ( ) : Workflows
getWorkflows ( ) : Workflows
serialize ( ) : array Formats User object into an associative array for output

Private Methods

Method Description
fetchAliases ( ) Requests API data and populates $this->aliases

Method Details

__construct() public method

Object constructor
public __construct ( object $attributes = null, array $options = [] )
$attributes object Attributes of this model
$options array Options with which to configure this model

dashboardUrl() public method

Provides Pantheon Dashboard URL for this user
public dashboardUrl ( ) : string
return string

getAliases() public method

Retrieves Drush aliases for this user
public getAliases ( ) : string
return string

getMachineTokens() public method

public getMachineTokens ( ) : Terminus\Collections\PaymentMethods
return Terminus\Collections\PaymentMethods

getName() public method

Get the user's full name.
public getName ( ) : string
return string

getOrgMemberships() public method

public getOrgMemberships ( ) : Terminus\Collections\UserOrganizationMemberships
return Terminus\Collections\UserOrganizationMemberships

getOrganizations() public method

Retrieves organization data for this user
public getOrganizations ( ) : Organization[]
return Organization[]

getPaymentMethods() public method

public getPaymentMethods ( ) : PaymentMethods
return Pantheon\Terminus\Collections\PaymentMethods

getProfile() public method

public getProfile ( ) : object
return object

getSSHKeys() public method

public getSSHKeys ( ) : Terminus\Collections\SSHKeys
return Terminus\Collections\SSHKeys

getSiteMemberships() public method

public getSiteMemberships ( ) : Terminus\Collections\UserSiteMemberships
return Terminus\Collections\UserSiteMemberships

getSites() public method

Requests API data and returns an object of user site data
public getSites ( ) : Site[]
return Site[]

getUpstreams() public method

public getUpstreams ( ) : Workflows
return Pantheon\Terminus\Collections\Workflows

getWorkflows() public method

public getWorkflows ( ) : Workflows
return Pantheon\Terminus\Collections\Workflows

serialize() public method

Formats User object into an associative array for output
public serialize ( ) : array
return array $data associative array of data for output

Property Details

$aliases protected property

protected stdClass $aliases
return stdClass

$machine_tokens protected property

protected PaymentMethods,Pantheon\Terminus\Collections $machine_tokens
return Pantheon\Terminus\Collections\PaymentMethods

$org_memberships protected property

protected UserOrganizationMemberships,Pantheon\Terminus\Collections $org_memberships
return Pantheon\Terminus\Collections\UserOrganizationMemberships

$payment_methods protected property

protected PaymentMethods,Pantheon\Terminus\Collections $payment_methods
return Pantheon\Terminus\Collections\PaymentMethods

$site_memberships protected property

protected UserSiteMemberships,Pantheon\Terminus\Collections $site_memberships
return Pantheon\Terminus\Collections\UserSiteMemberships

$ssh_keys protected property

protected SSHKeys,Pantheon\Terminus\Collections $ssh_keys
return Pantheon\Terminus\Collections\SSHKeys

$workflows protected property

protected Workflows,Pantheon\Terminus\Collections $workflows
return Pantheon\Terminus\Collections\Workflows