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

Show: inherited
Table of Contents

Abstracts the package building process

Package
modx  
Subpackage
transport  

\modPackageBuilder

Package: modx\transport

Abstracts the package building process

Children
\modXMLPackageBuilder

Properties

Propertypublicarray  $autoselects= ''

An array of classnames to automatically select by namespace
Details
Type
array
Access
public  
Propertypublicstring  $directory= ''

The directory in which the package file is located.
Details
Type
string
Access
public  
Propertypublicstring  $filename= ''

The filename of the actual package.
Details
Type
string
Access
public  
Propertypublicstring  $namespace= ''

The modNamespace that the package is associated with.
Details
Type
string
Access
public  
Propertypublicstring  $package= ''

The xPDOTransport package object.
Details
Type
string
Access
public  
Propertypublicstring  $signature= ''

The unique signature for the package.
Details
Type
string
Access
public  

Methods

methodpublic__construct( \modX $modx ) : \modPackageBuilder

Creates an instance of the modPackageBuilder class.

Parameters
Name Type Description
$modx \modX

&$modx A reference to a modX instance.

Returns
Type Description
\modPackageBuilder
methodpublicbuildSchema( string $model, string $schema ) : boolean

Generates the model from a schema.

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

Parameters
Name Type Description
$name string
$version string
$release string
Details
Deprecated
To be removed in 2.2  
See
\modPackageBuilder::createPackage  
methodpubliccreatePackage( string $name, string $version, string $release = '' ) : \xPDOTransport

Creates a new xPDOTransport package.

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

Creates the modTransportVehicle for the specified object.

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

Retrieves the package signature.

Returns
Type Description
string The signature of the included package.
Details
Access
public  
methodpublicpack( ) : boolean

Packs the package.

Returns
Type Description
boolean True if successful.
Details
Access
public  
See
\xPDOTransport::pack  
methodpublicputVehicle( \modTransportVehicle $vehicle ) : boolean

Puts the vehicle into the package.

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

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

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

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

Parameters
Name Type Description
$classes array

An array of class names to build in

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

Set an array of attributes into the xPDOTransport manifest.

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

Allows for customization of the package workspace.

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.