core/model/modx/transport/modxmlpackagebuilder.class.php

Show: inherited
Table of Contents

Package
modx  
Subpackage
transport  

\modXMLPackageBuilder

Package: modx\transport

Abstracts the package building process for XML builds

Parent(s)
\modPackageBuilder

Properties

Propertypublicarray  $autoselects= ''
inherited

An array of classnames to automatically select by namespaceInherited from: \modPackageBuilder::$$autoselects
Details
Type
array
Access
public  
Inherited_from
\modPackageBuilder::$$autoselects  
Propertypublicstring  $directory= ''
inherited

The directory in which the package file is located.Inherited from: \modPackageBuilder::$$directory
Details
Type
string
Access
public  
Inherited_from
\modPackageBuilder::$$directory  
Propertypublicstring  $filename= ''
inherited

The filename of the actual package.Inherited from: \modPackageBuilder::$$filename
Details
Type
string
Access
public  
Inherited_from
\modPackageBuilder::$$filename  
Propertypublicstring  $namespace= ''
inherited

The modNamespace that the package is associated with.Inherited from: \modPackageBuilder::$$namespace
Details
Type
string
Access
public  
Inherited_from
\modPackageBuilder::$$namespace  
Propertypublicstring  $package= ''
inherited

The xPDOTransport package object.Inherited from: \modPackageBuilder::$$package
Details
Type
string
Access
public  
Inherited_from
\modPackageBuilder::$$package  
Propertypublicstring  $signature= ''
inherited

The unique signature for the package.Inherited from: \modPackageBuilder::$$signature
Details
Type
string
Access
public  
Inherited_from
\modPackageBuilder::$$signature  

Methods

methodpublic__construct( \modX $modx ) : \modPackageBuilder
inherited

Creates an instance of the modPackageBuilder class.

Inherited from: \modPackageBuilder::__construct()
Parameters
Name Type Description
$modx \modX

&$modx A reference to a modX instance.

Returns
Type Description
\modPackageBuilder
methodprotected_handleCData( \xmlParser $parser, \$data $data ) : void

Parameters
Name Type Description
$parser \xmlParser

A reference to the xml parser instance

$data \$data

The data being wrapped in CDATA tags

methodprotected_handleCloseElement( \xmlParser $parser, string | array $element ) : void

Handles a closed XML tag

Parameters
Name Type Description
$parser \xmlParser

A reference to the xml parser instance

$element string | array

The closing element

methodprotected_handleOpenElement( \xmlParser $parser, string | array $element, array $attributes ) : void

Parameters
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

methodpublicbuild( string $fileName ) : bool

Build the package from a specific XML file

Parameters
Name Type Description
$fileName string

The XML file to parse

Returns
Type Description
bool True if successful
methodpublicbuildSchema( string $model, string $schema ) : boolean
inherited

Generates the model from a schema.

Inherited from: \modPackageBuilder::buildSchema()
Parameters
Name Type Description
$model string

The directory path of the model to generate to.

$schema string

The schema file to generate from.

Returns
Type Description
boolean true if successful
Details
Access
public  
methodpubliccreate( string $name, string $version, string $release = '' ) : void
inherited

Inherited from: \modPackageBuilder::create()
Parameters
Name Type Description
$name string
$version string
$release string
Details
See
\modPackageBuilder::createPackage  
methodpubliccreatePackage( string $name, string $version, string $release = '' ) : \xPDOTransport
inherited

Creates a new xPDOTransport package.

Inherited from: \modPackageBuilder::createPackage()
Parameters
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.

Returns
Type Description
\xPDOTransport The xPDOTransport package object.
Details
Access
public  
methodpubliccreateVehicle( \xPDOObject $obj, array $attr ) : \modTransportVehicle
inherited

Creates the modTransportVehicle for the specified object.

Inherited from: \modPackageBuilder::createVehicle()
Parameters
Name Type Description
$obj \xPDOObject

The xPDOObject being abstracted as a vehicle.

$attr array

Attributes for the vehicle.

Returns
Type Description
\modTransportVehicle The createed modTransportVehicle instance.
Details
Access
public  
methodpublicgetSignature( ) : string
inherited

Retrieves the package signature.

Inherited from: \modPackageBuilder::getSignature()
Returns
Type Description
string The signature of the included package.
Details
Access
public  
methodpublicpack( ) : boolean
inherited

Packs the package.

Inherited from: \modPackageBuilder::pack()
Returns
Type Description
boolean True if successful.
Details
Access
public  
See
\xPDOTransport::pack  
methodpublicparseXML( string $fileName ) : bool

Parse the XML file

Parameters
Name Type Description
$fileName string
Returns
Type Description
bool
methodpublicputVehicle( \modTransportVehicle $vehicle ) : boolean
inherited

Puts the vehicle into the package.

Inherited from: \modPackageBuilder::putVehicle()
Parameters
Name Type Description
$vehicle \modTransportVehicle

The vehicle to insert into the package.

Returns
Type Description
boolean True if successful.
Details
Access
public  
methodpublicregisterNamespace( string | \modNamespace $ns = 'core', boolean | array $autoincludes = true, boolean $packageNamespace = true, string $path = '' ) : boolean
inherited

Registers a namespace to the transport package. If no namespace is found, will create a namespace.

Inherited from: \modPackageBuilder::registerNamespace()
Parameters
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.

Returns
Type Description
boolean True if successful.
Details
Access
public  
methodpublicsetAutoSelects( array $classes = array () ) : void
inherited

Sets the classes that are to automatically be included and built into the package.

Inherited from: \modPackageBuilder::setAutoSelects()
Parameters
Name Type Description
$classes array

An array of class names to build in

Details
Access
public  
methodpublicsetPackageAttributes( array $attributes = array () ) : null
inherited

Set an array of attributes into the xPDOTransport manifest.

Inherited from: \modPackageBuilder::setPackageAttributes()
Parameters
Name Type Description
$attributes array

An array of attributes to set in the manifest of the package being built.

Returns
Type Description
null
Details
Access
public  
methodpublicsetWorkspace( integer $workspace_id ) : \modWorkspace
inherited

Allows for customization of the package workspace.

Inherited from: \modPackageBuilder::setWorkspace()
Parameters
Name Type Description
$workspace_id integer

The ID of the workspace to select.

Returns
Type Description
\modWorkspace The workspace set, false if invalid.
Details
Access
public  
Documentation was generated by DocBlox 0.18.1.