PHP Class Pantheon\Terminus\Models\Workflow

Inheritance: extends TerminusModel, implements League\Container\ContainerAwareInterface, implements Pantheon\Terminus\Session\SessionAwareInterface, use trait League\Container\ContainerAwareTrait, use trait Pantheon\Terminus\Session\SessionAwareTrait
Afficher le fichier Open project: pantheon-systems/terminus Class Usage Examples

Protected Properties

Свойство Type Description
$owner mixed

Méthodes publiques

Méthode Description
__construct ( object $attributes = null, array $options = [] ) : Workflow Object constructor
checkProgress ( ) : boolean Check on the progress of a workflow. This can be called repeatedly and will apply a polling period to prevent flooding the API with requests.
fetchWithLogs ( ) : Workflow Re-fetches workflow data hydrated with logs
getMessage ( ) : string Get the success message of a workflow or throw an exception of the workflow failed.
getStatus ( ) : string Returns the status of this workflow
getUrl ( ) : string Get the URL for this model
isFinished ( ) : boolean Detects if the workflow has finished
isSuccessful ( ) : boolean Detects if the workflow was successful
operations ( ) : WorkflowOperation[] Returns a list of WorkflowOperations for this workflow
serialize ( ) : array Formats workflow object into an associative array for output
wait ( ) : Workflow | void Waits on this workflow to finish

Private Methods

Méthode Description
poll ( ) : void Fetches this object from Pantheon. Waits a given length of time between checks.

Method Details

__construct() public méthode

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

checkProgress() public méthode

Check on the progress of a workflow. This can be called repeatedly and will apply a polling period to prevent flooding the API with requests.
public checkProgress ( ) : boolean
Résultat boolean Whether the workflow is finished or not

fetchWithLogs() public méthode

Re-fetches workflow data hydrated with logs
public fetchWithLogs ( ) : Workflow
Résultat Workflow

getMessage() public méthode

Get the success message of a workflow or throw an exception of the workflow failed.
public getMessage ( ) : string
Résultat string The message to output to the user

getStatus() public méthode

Returns the status of this workflow
public getStatus ( ) : string
Résultat string

getUrl() public méthode

Get the URL for this model
public getUrl ( ) : string
Résultat string

isFinished() public méthode

Detects if the workflow has finished
public isFinished ( ) : boolean
Résultat boolean True if workflow has finished

isSuccessful() public méthode

Detects if the workflow was successful
public isSuccessful ( ) : boolean
Résultat boolean True if workflow succeeded

operations() public méthode

Returns a list of WorkflowOperations for this workflow
public operations ( ) : WorkflowOperation[]
Résultat WorkflowOperation[]

serialize() public méthode

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

wait() public méthode

Waits on this workflow to finish
public wait ( ) : Workflow | void
Résultat Workflow | void

Property Details

$owner protected_oe property

protected mixed $owner
Résultat mixed