Switchboard
  • Namespace
  • Class
  • Tree

Namespaces

  • Fluxsauce
    • Switchboard

Classes

  • EnvDb
  • Environment
  • Persistent
  • Project
  • Provider
  • ProviderAcquia
  • ProviderPantheon
  • Site
  • Sqlite

Class ProviderAcquia

Acquia specific API interactions.

Fluxsauce\Switchboard\Provider
Extended by Fluxsauce\Switchboard\ProviderAcquia
Namespace: Fluxsauce\Switchboard
Package: Fluxsauce\Switchboard
Located at library/fluxsauce/switchboard/src/ProviderAcquia.php

Methods summary

public string
# siteGetField( string $site_name, string $field )

A mapping function that calls the appropriate API to populate a field.

A mapping function that calls the appropriate API to populate a field.

Parameters

$site_name
string
$site_name Machine name of the site in question.
$field
string
$field Name of the field to populate.

Returns

string
The value of the field.

Throws

Exception
Unknown field name.
public array
# requestsOptionsCustom( )

Provider specific options for Requests.

Provider specific options for Requests.

Returns

array
Options for the request; see Requests::request for details.
public boolean
# authLogin( string $email, string $password )

Log in to target Provider.

Log in to target Provider.

Parameters

$email
string
$email The email address of the user.
$password
string
$password The password of the user.

Returns

boolean
Indicates success.
protected mixed
# authEmailGet( )

Helper function to get the cached email.

Helper function to get the cached email.

Returns

mixed
The password in question or NULL.
protected mixed
# authPasswordGet( )

Helper function to get the cached password.

Helper function to get the cached password.

Returns

mixed
The password in question or NULL.
public boolean
# authIsLoggedIn( )

Determine whether a user is logged-in to a Provider.

Determine whether a user is logged-in to a Provider.

Returns

boolean
TRUE if they are.
public
# apiGetSites( )

Populate available Sites from a Provider.

Populate available Sites from a Provider.

public
# apiGetSite( string $site_name )

Perform an API call to get site information from a Provider.

Perform an API call to get site information from a Provider.

Parameters

$site_name
string
$site_name The name of the site in question.
public
# apiGetSiteEnvironments( string $site_name )

Populate available Site Environments from a Provider.

Populate available Site Environments from a Provider.

Parameters

$site_name
string
$site_name The machine name of the site in question.
public
# apiGetSiteEnvDbs( string $site_name, string $env_name )

Get and populate list of Databases for a particular Environment.

Get and populate list of Databases for a particular Environment.

Parameters

$site_name
string
$site_name The machine name of the Site.
$env_name
string
$env_name The machine name of the Site Environment.
public array
# apiGetSiteEnvDbBackups( string $site_name, string $env_name )

Get a list of database backups for a particular Site Environment.

Get a list of database backups for a particular Site Environment.

Parameters

$site_name
string
$site_name The machine name of the Site.
$env_name
string
$env_name The machine name of the Site Environment.

Returns

array
An array of Backup arrays keyed by the timestamp. Each Backup array has the following keys: - 'filename' - 'url' - 'timestamp'
public array
# getSiteEnvDbBackupLatest( string $site_name, string $env_name )

Helper function to get the latest database backup.

Helper function to get the latest database backup.

Parameters

$site_name
string
$site_name The machine name of the Site in question.
$env_name
string
$env_name The machine name of the Site Environment in question.

Returns

array
A backup array as defined in apiGetSiteEnvDbBackups().

Overrides

Fluxsauce\Switchboard\Provider::getSiteEnvDbBackupLatest
public string
# apiDownloadBackup( array $backup, string $destination )

Download a backup.

Download a backup.

Parameters

$backup
array
$backup An array from apiGetSiteEnvDbBackups().
$destination
string
$destination The path to the destination.

Returns

string
The full path to the downloaded backup.
public string
# getFilesPath( string $site_name, string $env_name )

Get the remote path to files for a particular Site Environment.

Get the remote path to files for a particular Site Environment.

Parameters

$site_name
string
$site_name The machine name of the Site in question.
$env_name
string
$env_name The machine name of the Site Environment in question.

Returns

string
The full path of the files directory.

Methods inherited from Fluxsauce\Switchboard\Provider

__construct(), __get(), authLogout(), drushCacheBinAuthName(), getInstance(), requestsOptions(), siteDestroy(), siteExists(), sitesDestroy()

Magic methods summary

Properties summary

protected string $name
#

Machine name of the Provider.

Machine name of the Provider.

protected string $label
#

Human readable label for the Provider.

Human readable label for the Provider.

protected string $homepage
#

Homepage URL for the provider.

Homepage URL for the provider.

protected string $endpoint
#

Endpoint URL for the provider.

Endpoint URL for the provider.

Properties inherited from Fluxsauce\Switchboard\Provider

$sites

Switchboard API documentation generated by ApiGen 2.8.0