core/model/modx/transport/modxmlpackagebuilder.class.php
- Package
- modx
- Subpackage
- transport
\modXMLPackageBuilder
Abstracts the package building process for XML builds
- Parent(s)
- \modPackageBuilder
Properties
array
$autoselects= ''
- Type
- array
- Access
- public
- Inherited_from
- \modPackageBuilder::$$autoselects
string
$directory= ''
- Type
- string
- Access
- public
- Inherited_from
- \modPackageBuilder::$$directory
string
$filename= ''
- Type
- string
- Access
- public
- Inherited_from
- \modPackageBuilder::$$filename
string
$namespace= ''
- Type
- string
- Access
- public
- Inherited_from
- \modPackageBuilder::$$namespace
string
$package= ''
- Type
- string
- Access
- public
- Inherited_from
- \modPackageBuilder::$$package
string
$signature= ''
- Type
- string
- Access
- public
- Inherited_from
- \modPackageBuilder::$$signature
Methods
__construct(
\modX $modx
)
:
\modPackageBuilder
Creates an instance of the modPackageBuilder class.
Inherited from: \modPackageBuilder::__construct()Name | Type | Description |
---|---|---|
$modx | \modX | &$modx A reference to a modX instance. |
Type | Description |
---|---|
\modPackageBuilder |
_handleCData(
\xmlParser $parser, \$data $data
)
:
void
Name | Type | Description |
---|---|---|
$parser | \xmlParser | A reference to the xml parser instance |
$data | \$data | The data being wrapped in CDATA tags |
_handleCloseElement(
\xmlParser $parser, string | array $element
)
:
void
Handles a closed XML tag
Name | Type | Description |
---|---|---|
$parser | \xmlParser | A reference to the xml parser instance |
$element | string | array | The closing element |
_handleOpenElement(
\xmlParser $parser, string | array $element, array $attributes
)
:
void
Name | Type | Description |
---|---|---|
$parser | \xmlParser | A reference to the xml parser instance |
$element | string | array | The opening XML element |
$attributes | array | An array of attributes on the element |
build(
string $fileName
)
:
bool
Build the package from a specific XML file
Name | Type | Description |
---|---|---|
$fileName | string | The XML file to parse |
Type | Description |
---|---|
bool | True if successful |
buildSchema(
string $model, string $schema
)
:
boolean
Name | Type | Description |
---|---|---|
$model | string | The directory path of the model to generate to. |
$schema | string | The schema file to generate from. |
Type | Description |
---|---|
boolean | true if successful |
- Access
- public
create(
string $name, string $version, string $release
=
''
)
:
void
Name | Type | Description |
---|---|---|
$name | string | |
$version | string | |
$release | string |
createPackage(
string $name, string $version, string $release
=
''
)
:
\xPDOTransport
Name | Type | Description |
---|---|---|
$name | string | The name of the component the package represents. |
$version | string | A string representing the version of the package. |
$release | string | A string describing the specific release of this version of the package. |
Type | Description |
---|---|
\xPDOTransport | The xPDOTransport package object. |
- Access
- public
createVehicle(
\xPDOObject $obj, array $attr
)
:
\modTransportVehicle
Creates the modTransportVehicle for the specified object.
Inherited from: \modPackageBuilder::createVehicle()Name | Type | Description |
---|---|---|
$obj | \xPDOObject | The xPDOObject being abstracted as a vehicle. |
$attr | array | Attributes for the vehicle. |
Type | Description |
---|---|
\modTransportVehicle | The createed modTransportVehicle instance. |
- Access
- public
getSignature(
)
:
string
Type | Description |
---|---|
string | The signature of the included package. |
- Access
- public
pack(
)
:
boolean
Type | Description |
---|---|
boolean | True if successful. |
- Access
- public
- See
- \xPDOTransport::pack
parseXML(
string $fileName
)
:
bool
Parse the XML file
Name | Type | Description |
---|---|---|
$fileName | string |
Type | Description |
---|---|
bool |
putVehicle(
\modTransportVehicle $vehicle
)
:
boolean
Name | Type | Description |
---|---|---|
$vehicle | \modTransportVehicle | The vehicle to insert into the package. |
Type | Description |
---|---|
boolean | True if successful. |
- Access
- public
registerNamespace(
string | \modNamespace $ns
=
'core', boolean | array $autoincludes
=
true, boolean $packageNamespace
=
true, string $path
=
''
)
:
boolean
Registers a namespace to the transport package. If no namespace is found, will create a namespace.
Inherited from: \modPackageBuilder::registerNamespace()Name | Type | Description |
---|---|---|
$ns | string | \modNamespace | The modNamespace object or the string name of the namespace |
$autoincludes | boolean | array | If true, will automatically select relative resources to the namespace. |
$packageNamespace | boolean | If false, will not package the namespace as a vehicle. |
$path | string | The path for the namespace to be created. |
Type | Description |
---|---|
boolean | True if successful. |
- Access
- public
setAutoSelects(
array $classes
=
array ()
)
:
void
Sets the classes that are to automatically be included and built into the package.
Inherited from: \modPackageBuilder::setAutoSelects()Name | Type | Description |
---|---|---|
$classes | array | An array of class names to build in |
- Access
- public
setPackageAttributes(
array $attributes
=
array ()
)
:
null
Set an array of attributes into the xPDOTransport manifest.
Inherited from: \modPackageBuilder::setPackageAttributes()Name | Type | Description |
---|---|---|
$attributes | array | An array of attributes to set in the manifest of the package being built. |
Type | Description |
---|---|
null |
- Access
- public
setWorkspace(
integer $workspace_id
)
:
\modWorkspace
Allows for customization of the package workspace.
Inherited from: \modPackageBuilder::setWorkspace()Name | Type | Description |
---|---|---|
$workspace_id | integer | The ID of the workspace to select. |
Type | Description |
---|---|
\modWorkspace | The workspace set, false if invalid. |
- Access
- public