xpdo/transport/xpdovehicle.class.php

Classes 
package
xpdo
subpackage
transport
Classes
xPDOVehicle

Description

Abstract class that represents an artifact within a transportable package.

\xPDOVehicle

abstract
package
xpdo
subpackage
transport
Properties
$class
$payload
Methods
_compilePayload
get
install
put
register
resolve
store
uninstall
validate

Description

Represents an individual artifact within an {@link xPDOTransport} package.

Extend this abstract class to provide custom xPDOVehicle behavior for various kinds of artifacts (e.g. objects, xPDOObjects, files, database schemas, etc.).

Properties

$class

 $class = 'xPDOVehicle'

Details

visibility
public
default
xPDOVehicle
final
false
static
false

$payload

array $payload = 'array'

Represents the artifact and related attributes stored in the vehicle.

Details

array
visibility
public
default
array
final
false
static
false

Methods

_compilePayload

_compilePayload( \xPDOTransport $transport ) :

Compile necessary resources in preparation for storing the vehicle.

Arguments
$transport
\xPDOTransport
&$transport A reference to the transport the vehicle is being stored in.
Details
visibility
protected
final
false
static
false
access
protected

get

get( \xPDOTransport $transport, array $options = array, array $element = null ) :

Retrieve an artifact represented in this vehicle.

By default, this method simply returns the raw payload merged with the provided options, but you can optionally provide a payload element specifically on which to operate as well as override the method in derivatives to further transform the returned artifact.

Arguments
$transport
\xPDOTransport
The transport package containing this vehicle.
$options
array
Options that apply to the artifact or retrieval process.
$element
array
An optional payload element representing a specific part of the artifact to operate on. If not specified, the root element of the payload is used.
Details
visibility
public
final
false
static
false

install

install( \xPDOTransport $transport, array $options ) : boolean

Install the vehicle artifact into a transport host.

Arguments
$transport
\xPDOTransport
&$transport A reference to the transport.
$options
array
An array of options for altering the installation of the artifact.
Output
boolean
True if the installation of the vehicle artifact was successful.
Details
visibility
public
final
false
static
false
abstract
Implement this in a derivative to make an installable vehicle.

put

put( \xPDOTransport $transport, mixed $object, array $attributes = array ) :

Put an artifact representation into this vehicle.

Arguments
$transport
\xPDOTransport
The transport package hosting the vehicle.
$object
mixed
&$object A reference to the artifact this vehicle will represent.
$attributes
array
Additional attributes represented in the vehicle.
Details
visibility
public
final
false
static
false

register

register( \xPDOTransport $transport ) : array

Build a manifest entry to be registered in a transport for this vehicle.

Arguments
$transport
\xPDOTransport
&$transport The xPDOTransport instance to register the vehicle into.
Output
array
An array of vehicle attributes that will be registered into an xPDOTransport manifest.
Details
visibility
public
final
false
static
false

resolve

resolve( \xPDOTransport $transport, mixed $object, array $options = array ) : boolean

Resolve any dependencies of the artifact represented in this vehicle.

Arguments
$transport
\xPDOTransport
&$transport A reference to the xPDOTransport in which this vehicle is stored.
$object
mixed
&$object An object reference to resolve dependencies for. Use this to make the artifact or other important data available to the resolver scripts.
$options
array
Additional options for the resolution process.
Output
boolean
Indicates if the resolution was successful.
Details
visibility
public
final
false
static
false

store

store( \xPDOTransport $transport ) : boolean

Store this xPDOVehicle instance into an xPDOTransport.

Arguments
$transport
\xPDOTransport
&$transport The transport to store the vehicle in.
Output
boolean
Indicates if the vehicle was stored in the transport.
Details
visibility
public
final
false
static
false

uninstall

uninstall( \xPDOTransport $transport, array $options ) :

Uninstalls the vehicle artifact from a transport host.

Arguments
$transport
\xPDOTransport
&$transport A reference to the transport.
$options
array
An array of options for altering the uninstallation of the artifact.
Details
visibility
public
final
false
static
false
abstract
Implement this in a derivative to make an uninstallable vehicle.

validate

validate( \xPDOTransport $transport, \xPDOObject $object, array $options = array ) : boolean

Validate any dependencies for the object represented in this vehicle.

Arguments
$transport
\xPDOTransport
&$transport A reference to the xPDOTransport in which this vehicle is stored.
$object
\xPDOObject
&$object An object reference to access during validation.
$options
array
Additional options for the validation process.
Output
boolean
Indicating if the validation was successful.
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox 0.11.2.