PHP Class Pantheon\Terminus\Models\Site

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

Méthodes publiques

Свойство Type Description
$branches Pantheon\Terminus\Collections\Branches
$environments Pantheon\Terminus\Collections\Environments
$new_relic NewRelic
$org_memberships Pantheon\Terminus\Collections\SiteOrganizationMemberships
$redis Redis
$solr Solr
$user_memberships Pantheon\Terminus\Collections\SiteUserMemberships
$workflows Pantheon\Terminus\Collections\Workflows

Protected Properties

Свойство Type Description
$upstream_data stdClass
$url The URL at which to fetch this model's information

Méthodes publiques

Méthode Description
__construct ( $attributes = null, array $options = [] )
addPaymentMethod ( string $payment_method_id ) : Workflow Add a payment method to the given site
completeMigration ( ) : Workflow Completes a site migration in progress
converge ( ) : Workflow Converges all bindings on a site
dashboardUrl ( ) : string Provides Pantheon Dashboard URL for this site
delete ( ) : Workflow Deletes the site represented by this object
deployProduct ( string $upstream_id ) : Workflow Creates a new site for migration
fetch ( array $options = [] ) : Site Fetches this object from Pantheon
getBranches ( ) : Branches
getEnvironments ( ) : Environments
getFeature ( string $feature ) : mixed | null Returns a specific site feature value
getName ( ) : mixed Get the human-readable name of the site
getNewRelic ( ) : NewRelic
getOrganizationMemberships ( ) : SiteOrganizationMemberships
getOrganizations ( ) : SiteOrganizationMembership[] Returns all organization members of this site
getRedis ( ) : Redis
getSolr ( ) : Solr
getUpstream ( ) : Upstream
getUserMemberships ( ) : SiteUserMemberships
getWorkflows ( ) : Workflows
removePaymentMethod ( ) : Workflow Remove this site's payment method
serialize ( ) : array Formats the Site object into an associative array for output
setOwner ( User $user_id ) : Workflow Sets the site owner to the indicated team member
updateServiceLevel ( string $service_level ) : Workflow Update service level

Méthodes protégées

Méthode Description
parseAttributes ( object $data ) : object Modify response data between fetch and assignment

Private Methods

Méthode Description
setUpstream ( object $attributes ) Ensures the proper creation of an Upstream object

Method Details

__construct() public méthode

public __construct ( $attributes = null, array $options = [] )
$options array

addPaymentMethod() public méthode

Add a payment method to the given site
public addPaymentMethod ( string $payment_method_id ) : Workflow
$payment_method_id string UUID of new payment method
Résultat Workflow

completeMigration() public méthode

Completes a site migration in progress
public completeMigration ( ) : Workflow
Résultat Workflow

converge() public méthode

Converges all bindings on a site
public converge ( ) : Workflow
Résultat Workflow

dashboardUrl() public méthode

Provides Pantheon Dashboard URL for this site
public dashboardUrl ( ) : string
Résultat string

delete() public méthode

Deletes the site represented by this object
public delete ( ) : Workflow
Résultat Workflow

deployProduct() public méthode

Creates a new site for migration
public deployProduct ( string $upstream_id ) : Workflow
$upstream_id string The UUID for the product to deploy.
Résultat Workflow

fetch() public méthode

Fetches this object from Pantheon
public fetch ( array $options = [] ) : Site
$options array params to pass to url request
Résultat Site

getBranches() public méthode

public getBranches ( ) : Branches
Résultat Pantheon\Terminus\Collections\Branches

getEnvironments() public méthode

public getEnvironments ( ) : Environments
Résultat Pantheon\Terminus\Collections\Environments

getFeature() public méthode

Returns a specific site feature value
public getFeature ( string $feature ) : mixed | null
$feature string Feature to check
Résultat mixed | null Feature value, or null if not found

getName() public méthode

Get the human-readable name of the site
public getName ( ) : mixed
Résultat mixed

getNewRelic() public méthode

public getNewRelic ( ) : NewRelic
Résultat NewRelic

getOrganizationMemberships() public méthode

public getOrganizationMemberships ( ) : SiteOrganizationMemberships
Résultat Pantheon\Terminus\Collections\SiteOrganizationMemberships

getOrganizations() public méthode

Returns all organization members of this site
public getOrganizations ( ) : SiteOrganizationMembership[]
Résultat SiteOrganizationMembership[]

getRedis() public méthode

public getRedis ( ) : Redis
Résultat Redis

getSolr() public méthode

public getSolr ( ) : Solr
Résultat Solr

getUpstream() public méthode

public getUpstream ( ) : Upstream
Résultat Upstream

getUserMemberships() public méthode

public getUserMemberships ( ) : SiteUserMemberships
Résultat Pantheon\Terminus\Collections\SiteUserMemberships

getWorkflows() public méthode

public getWorkflows ( ) : Workflows
Résultat Pantheon\Terminus\Collections\Workflows

parseAttributes() protected méthode

Modify response data between fetch and assignment
protected parseAttributes ( object $data ) : object
$data object attributes received from API response
Résultat object $data

removePaymentMethod() public méthode

Remove this site's payment method
public removePaymentMethod ( ) : Workflow
Résultat Workflow

serialize() public méthode

Formats the Site object into an associative array for output
public serialize ( ) : array
Résultat array Associative array of data for output

setOwner() public méthode

Sets the site owner to the indicated team member
public setOwner ( User $user_id ) : Workflow
$user_id User UUID of new owner of site
Résultat Workflow

updateServiceLevel() public méthode

Update service level
public updateServiceLevel ( string $service_level ) : Workflow
$service_level string Level to set service on site to
Résultat Workflow

Property Details

$branches public_oe property

public Branches,Pantheon\Terminus\Collections $branches
Résultat Pantheon\Terminus\Collections\Branches

$environments public_oe property

public Environments,Pantheon\Terminus\Collections $environments
Résultat Pantheon\Terminus\Collections\Environments

$new_relic public_oe property

public NewRelic,Pantheon\Terminus\Models $new_relic
Résultat NewRelic

$org_memberships public_oe property

public SiteOrganizationMemberships,Pantheon\Terminus\Collections $org_memberships
Résultat Pantheon\Terminus\Collections\SiteOrganizationMemberships

$redis public_oe property

public Redis,Pantheon\Terminus\Models $redis
Résultat Redis

$solr public_oe property

public Solr,Pantheon\Terminus\Models $solr
Résultat Solr

$upstream_data protected_oe property

protected stdClass $upstream_data
Résultat stdClass

$url protected_oe property

The URL at which to fetch this model's information
protected $url

$user_memberships public_oe property

public SiteUserMemberships,Pantheon\Terminus\Collections $user_memberships
Résultat Pantheon\Terminus\Collections\SiteUserMemberships

$workflows public_oe property

public Workflows,Pantheon\Terminus\Collections $workflows
Résultat Pantheon\Terminus\Collections\Workflows