core/xpdo/transport/xpdofilevehicle.class.php

Show: inherited
Table of Contents

Defines a class that represents a fileset within a transportable package.

Package
xpdo  
Subpackage
transport  

\xPDOFileVehicle

Package: xpdo\transport

Represents an individual file set 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.).

Parent(s)
\xPDOVehicle

Properties

Propertypublic  $class= ''xPDOFileVehicle''
Default value'xPDOFileVehicle'Details
Type
n/a
Propertypublicarray  $payload= 'array ()'
inherited

Represents the artifact and related attributes stored in the vehicle.

Inherited from: \xPDOVehicle::$$payload
Default valuearray ()Details
Type
array
Inherited_from
\xPDOVehicle::$$payload  

Methods

methodprotected_compilePayload( \xPDOTransport $transport ) : void

Copies the files into the vehicle and transforms the payload for storage.

Parameters
Name Type Description
$transport \xPDOTransport

&$transport A reference to the transport the vehicle is being stored in.

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

Install files or folders represented by and stored in this vehicle.

Parameters
Name Type Description
$transport \xPDOTransport

&$transport A reference the transport this vehicle is stored in.

$options array

Optional attributes that can be applied to vehicle install process.

Returns
Type Description
boolean True if the files are installed successfully.
Details
Access
protected  
methodprotected_uninstallFiles( \xPDOTransport $transport, array $options ) : boolean

Uninstall files or folders represented by and stored in this vehicle.

Parameters
Name Type Description
$transport \xPDOTransport

&$transport A reference the transport this vehicle is stored in.

$options array

Optional attributes that can be applied to vehicle uninstall process.

Returns
Type Description
boolean True if the files are uninstalled successfully.
Details
Access
protected  
methodpublicget( \xPDOTransport $transport, array $options = array (), array $element = null ) : void
inherited

Retrieve an artifact represented in this vehicle.

Inherited from: \xPDOVehicle::get()

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.

Parameters
Name Type Description
$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.

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

Install a file set represented by and stored in this vehicle.

Parameters
Name Type Description
$transport \xPDOTransport

&$transport A reference to the transport.

$options array

An array of options for altering the installation of the artifact.

Returns
Type Description
boolean True if the installation of the vehicle artifact was successful.
methodpublicput( \xPDOTransport $transport, mixed $object, array $attributes = array () ) : void

Adds the file definition object to the payload.

Parameters
Name Type Description
$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.

methodpublicregister( \xPDOTransport $transport ) : array
inherited

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

Inherited from: \xPDOVehicle::register()
Parameters
Name Type Description
$transport \xPDOTransport

&$transport The xPDOTransport instance to register the vehicle into.

Returns
Type Description
array An array of vehicle attributes that will be registered into an xPDOTransport manifest.
methodpublicresolve( \xPDOTransport $transport, mixed $object, array $options = array () ) : boolean
inherited

Resolve any dependencies of the artifact represented in this vehicle.

Inherited from: \xPDOVehicle::resolve()
Parameters
Name Type Description
$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.

Returns
Type Description
boolean Indicates if the resolution was successful.
methodpublicstore( \xPDOTransport $transport ) : boolean
inherited

Store this xPDOVehicle instance into an xPDOTransport.

Inherited from: \xPDOVehicle::store()
Parameters
Name Type Description
$transport \xPDOTransport

&$transport The transport to store the vehicle in.

Returns
Type Description
boolean Indicates if the vehicle was stored in the transport.
methodpublicuninstall( \xPDOTransport $transport, array $options ) : void

Uninstall a file set represented by and stored in this vehicle.

Parameters
Name Type Description
$transport \xPDOTransport

&$transport A reference to the transport.

$options array

An array of options for altering the uninstallation of the artifact.

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

Validate any dependencies for the object represented in this vehicle.

Inherited from: \xPDOVehicle::validate()
Parameters
Name Type Description
$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.

Returns
Type Description
boolean Indicating if the validation was successful.
Documentation was generated by DocBlox 0.18.1.