PHP Class Teleport\Action\Extract

Inheritance: extends Teleport\Action\Action
Show file Open project: modxcms/teleport

Public Properties

Property Type Description
$package The transport package Extracted from the \modX instance.

Protected Properties

Property Type Description
$required Defines the arguments required for the Push action.

Public Methods

Method Description
process ( ) Process the Extract action.

Protected Methods

Method Description
createPackage ( string $name, string $version, string $release = '' ) : Teleport\Transport\Transport Create a Transport package to store extracted data into.
createVehicles ( object $vehicle ) : integer Create \xPDOVehicle instances from MODX assets and data to go into the Snapshot.
getName ( ) : string Get a package name for this snapshot.
getSequence ( ) : string Get a package sequence for this snapshot.
getVersion ( ) : string Get a package version for this snapshot.
loadTpl ( string $tpl ) : array Load the JSON extract tpl data into a PHP array.
prepareTpl ( string &$content ) Parse the tpl replacing placeholders from the profile and request arguments.

Method Details

createPackage() protected method

Create a Transport package to store extracted data into.
protected createPackage ( string $name, string $version, string $release = '' ) : Teleport\Transport\Transport
$name string The name of the package to create.
$version string The version of the package to create.
$release string The release of the package to create.
return Teleport\Transport\Transport A new Transport instance with a signature compiled from name, version, and release.

createVehicles() protected method

Create \xPDOVehicle instances from MODX assets and data to go into the Snapshot.
protected createVehicles ( object $vehicle ) : integer
$vehicle object A vehicle definition from the Extract tpl being applied.
return integer The number of vehicles created from the definition.

getName() protected method

Get a package name for this snapshot.
protected getName ( ) : string
return string The package name.

getSequence() protected method

Get a package sequence for this snapshot.
protected getSequence ( ) : string
return string The package sequence string.

getVersion() protected method

Get a package version for this snapshot.
protected getVersion ( ) : string
return string The package version string.

loadTpl() protected method

Load the JSON extract tpl data into a PHP array.
protected loadTpl ( string $tpl ) : array
$tpl string A valid stream or file location for the tpl.
return array An array of the tpl data.

prepareTpl() protected method

Parse the tpl replacing placeholders from the profile and request arguments.
protected prepareTpl ( string &$content )
$content string The content of the tpl.

process() public method

Process the Extract action.
public process ( )

Property Details

$package public property

The transport package Extracted from the \modX instance.
public $package

$required protected property

Defines the arguments required for the Push action.
protected $required