model/modx/transport/modtransportvehicle.class.php
- package
- modx
- subpackage
- transport
- Classes
- modTransportVehicle
Description
\modTransportVehicle
- package
- modx
- subpackage
- transport
- Properties
- $attributes
- $obj
- $resolvers
- $validators
- Methods
- __construct
- compile
- fetch
- resolve
- validate
Description
Abstracts the vehicle construct for package building.
Properties
$attributes
array $attributes = ''
Details
- array
The collection of attributes to attach to the vehicle. - visibility
- public
- default
- final
- false
- static
- false
- access
- public
$obj
mixed $obj = ''
Details
- mixed
The actual object or artifact payload that the vehicle represents. - visibility
- public
- default
- final
- false
- static
- false
- access
- public
$resolvers
array $resolvers = ''
Details
- array
The collection of dependencies to resolve post-install/upgrade. - visibility
- public
- default
- final
- false
- static
- false
- access
- public
$validators
string $validators = ''
Details
- string
The collection of dependences to validate against pre-install/upgrade. - visibility
- public
- default
- final
- false
- static
- false
- access
- public
Methods
__construct
__construct(
mixed $obj, array $attr
=
array
)
:
Creates an instance of the modTransportVehicle class.
Arguments
- $obj
- mixed
The object that the vehicle represents. - $attr
- array
An array of attributes for the object.
Details
- visibility
- public
- final
- false
- static
- false
compile
compile(
)
:
array
Compiles the attributes array to pass on to the modPackageBuilder instance.
Output
- array
- An array of added attributes.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
fetch
fetch(
)
:
mixed
Returns the artifact payload associated with the vehicle.
Output
- mixed
- The payload for this vehicle.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
resolve
resolve(
string $type, array $options
)
:
array
Adds a post-save resolver to the vehicle.
Arguments
- $type
- string
The type of resolver (php,file,etc) - $options
- array
An array of options for the resolver.
Output
- array
- The added resolver.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public
validate
validate(
string $type, array $options
)
:
array
Adds a pre-creation validator to the vehicle.
Arguments
- $type
- string
The type of validator (php,file,etc) - $options
- array
An array of options for the validator.
Output
- array
- The added validator.
Details
- visibility
- public
- final
- false
- static
- false
- access
- public