xpdo/transport/xpdotransportvehicle.class.php
- package
- xpdo
- subpackage
- transport
- Classes
- xPDOTransportVehicle
Description
Defines a class that represents an embedded package within a transportable package.
\xPDOTransportVehicle
- Extends from
- \xPDOVehicle
- package
- xpdo
- subpackage
- transport
- Properties
- $class
- Methods
- _compilePayload
- _installTransport
- install
- put
- uninstall
Description
Represents an xPDOTransport embedded 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 = 'xPDOTransportVehicle'
Details
- visibility
- public
- default
- xPDOTransportVehicle
- final
- false
- static
- false
Methods
_compilePayload
_compilePayload(
\xPDOTransport $transport
)
:
Copies the transport into the vehicle and transforms the payload for storage.
Arguments
- $transport
- \xPDOTransport
&$transport A reference to the transport the vehicle is being stored in.
Details
- visibility
- protected
- final
- false
- static
- false
_installTransport
_installTransport(
\xPDOTransport $transport, array $options
)
:
Install the xPDOTransport from the vehicle payload.
Arguments
- $transport
- \xPDOTransport
The host xPDOTransport instance. - $options
- array
Any optional attributes to apply to the installation.
Details
- visibility
- protected
- final
- false
- static
- false
install
install(
\xPDOTransport $transport, array $options
)
:
boolean
Install the xPDOTransport represented by this vehicle into the 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
put
put(
\xPDOTransport $transport, mixed $object, array $attributes
=
array
)
:
Put an xPDOTransport representation into a transport package.
This implementation supports the inclusion of related objects. Simply instantiate the related objects that you want to include in the vehicle on the main object, and set xPDOTransport::RELATED_OBJECTS => true in your attributes.
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
uninstall
uninstall(
\xPDOTransport $transport, array $options
)
:
Uninstalls vehicle artifacts from the 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