xpdo/transport/xpdofilevehicle.class.php
- package
- xpdo
- subpackage
- transport
- Classes
- xPDOFileVehicle
Description
Defines a class that represents a fileset within a transportable package.
\xPDOFileVehicle
- Extends from
- \xPDOVehicle
- package
- xpdo
- subpackage
- transport
- Properties
- $class
- Methods
- _compilePayload
- _installFiles
- _uninstallFiles
- install
- put
- uninstall
Description
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.).
Properties
$class
$class = 'xPDOFileVehicle'
Details
- visibility
- public
- default
- xPDOFileVehicle
- final
- false
- static
- false
Methods
_compilePayload
_compilePayload(
\xPDOTransport $transport
)
:
Copies the files 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
_installFiles
_installFiles(
\xPDOTransport $transport, array $options
)
:
boolean
Install files or folders represented by and stored in this vehicle.
Arguments
- $transport
- \xPDOTransport
&$transport A reference the transport this vehicle is stored in. - $options
- array
Optional attributes that can be applied to vehicle install process.
Output
- boolean
- True if the files are installed successfully.
Details
- visibility
- protected
- final
- false
- static
- false
- access
- protected
_uninstallFiles
_uninstallFiles(
\xPDOTransport $transport, array $options
)
:
boolean
Uninstall files or folders represented by and stored in this vehicle.
Arguments
- $transport
- \xPDOTransport
&$transport A reference the transport this vehicle is stored in. - $options
- array
Optional attributes that can be applied to vehicle uninstall process.
Output
- boolean
- True if the files are uninstalled successfully.
Details
- visibility
- protected
- final
- false
- static
- false
- access
- protected
install
install(
\xPDOTransport $transport, array $options
)
:
boolean
Install a file set represented by and stored in this vehicle.
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
)
:
Adds the file definition object to the payload.
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
)
:
Uninstall a file set represented by and stored in this vehicle.
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