core/model/modx/transport/modtransportvehicle.class.php
- Package
- modx
- Subpackage
- transport
\modTransportVehicle
Package: modx\transport
Abstracts the vehicle construct for package building.
Properties

array
$attributes= ''
The collection of attributes to attach to the vehicle.
Details
- Type
- array
- Access
- public

mixed
$obj= ''
The actual object or artifact payload that the vehicle represents.
Details
- Type
- mixed
- Access
- public

array
$resolvers= ''
The collection of dependencies to resolve post-install/upgrade.
Details
- Type
- array
- Access
- public
Methods

__construct(
mixed $obj, array $attr
=
array ()
)
:
voidCreates an instance of the modTransportVehicle class.
Parameters
| Name | Type | Description |
|---|---|---|
| $obj | mixed | The object that the vehicle represents. |
| $attr | array | An array of attributes for the object. |

compile(
)
:
arrayCompiles the attributes array to pass on to the modPackageBuilder instance.
Returns
Details
| Type | Description |
|---|---|
| array | An array of added attributes. |
- Access
- public

fetch(
)
:
mixedReturns the artifact payload associated with the vehicle.
Returns
Details
| Type | Description |
|---|---|
| mixed | The payload for this vehicle. |
- Access
- public

resolve(
string $type, array $options
)
:
arrayAdds a post-save resolver to the vehicle.
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $type | string | The type of resolver (php,file,etc) |
| $options | array | An array of options for the resolver. |
| Type | Description |
|---|---|
| array | The added resolver. |
- Access
- public

validate(
string $type, array $options
)
:
arrayAdds a pre-creation validator to the vehicle.
Parameters
Returns
Details
| Name | Type | Description |
|---|---|---|
| $type | string | The type of validator (php,file,etc) |
| $options | array | An array of options for the validator. |
| Type | Description |
|---|---|
| array | The added validator. |
- Access
- public