model/modx/transport/modpackagebuilder.class.php

Classes 
package
modx
subpackage
transport
Classes
modPackageBuilder

Description

Abstracts the package building process

\modPackageBuilder

package
modx
subpackage
transport
Properties
$autoselects
$directory
$filename
$namespace
$package
$signature
Methods
__construct
buildSchema
create
createPackage
createVehicle
getSignature
pack
putVehicle
registerNamespace
setAutoSelects
setPackageAttributes
setWorkspace

Description

Abstracts the package building process

Properties

$autoselectsAn array of classnames to automatically select by namespace

array $autoselects = ''

Details

array
An array of classnames to automatically select by namespace
visibility
public
default
final
false
static
false
access
public

$directoryThe directory in which the package file is located.

string $directory = ''

Details

string
The directory in which the package file is located.
visibility
public
default
final
false
static
false
access
public

$filenameThe filename of the actual package.

string $filename = ''

Details

string
The filename of the actual package.
visibility
public
default
final
false
static
false
access
public

$namespaceThe modNamespace that the package is associated with.

string $namespace = ''

Details

string
The modNamespace that the package is associated with.
visibility
public
default
final
false
static
false
access
public

$packageThe xPDOTransport package object.

string $package = ''

Details

string
The xPDOTransport package object.
visibility
public
default
final
false
static
false
access
public

$signatureThe unique signature for the package.

string $signature = ''

Details

string
The unique signature for the package.
visibility
public
default
final
false
static
false
access
public

Methods

__construct

__construct( \modX $modx ) : \modPackageBuilder

Creates an instance of the modPackageBuilder class.

Arguments
$modx
\modX
&$modx A reference to a modX instance.
Details
visibility
public
final
false
static
false

buildSchema

buildSchema( string $model, string $schema ) : boolean

Generates the model from a schema.

Arguments
$model
string
The directory path of the model to generate to.
$schema
string
The schema file to generate from.
Output
boolean
true if successful
Details
visibility
public
final
false
static
false
access
public

create

create( string $name, string $version, string $release ) :

Arguments
$name
string
$version
string
$release
string
Details
visibility
public
final
false
static
false
deprecated
To be removed in 2.2
see
modPackageBuilder::createPackage

createPackage

createPackage( string $name, string $version, string $release ) : \xPDOTransport

Creates a new xPDOTransport package.

Arguments
$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.
Output
\xPDOTransport
The xPDOTransport package object.
Details
visibility
public
final
false
static
false
access
public

createVehicle

createVehicle( \xPDOObject $obj, array $attr ) : \modTransportVehicle

Creates the modTransportVehicle for the specified object.

Arguments
$obj
\xPDOObject
The xPDOObject being abstracted as a vehicle.
$attr
array
Attributes for the vehicle.
Output
\modTransportVehicle
The createed modTransportVehicle instance.
Details
visibility
public
final
false
static
false
access
public

getSignature

getSignature( ) : string

Retrieves the package signature.

Output
string
The signature of the included package.
Details
visibility
public
final
false
static
false
access
public

pack

pack( ) : boolean

Packs the package.

Output
boolean
True if successful.
Details
visibility
public
final
false
static
false
access
public
see
xPDOTransport::pack

putVehicle

putVehicle( \modTransportVehicle $vehicle ) : boolean

Puts the vehicle into the package.

Arguments
$vehicle
\modTransportVehicle
The vehicle to insert into the package.
Output
boolean
True if successful.
Details
visibility
public
final
false
static
false
access
public

registerNamespace

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.

Arguments
$ns
string\modNamespace
The modNamespace object or the string name of the namespace
$autoincludes
booleanarray
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.
Output
boolean
True if successful.
Details
visibility
public
final
false
static
false
access
public

setAutoSelects

setAutoSelects( array $classes = array ) : void

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

Arguments
$classes
array
An array of class names to build in
Details
visibility
public
final
false
static
false
access
public

setPackageAttributes

setPackageAttributes( array $attributes = array ) : null

Set an array of attributes into the xPDOTransport manifest.

Arguments
$attributes
array
An array of attributes to set in the manifest of the package being built.
Output
null
Details
visibility
public
final
false
static
false
access
public

setWorkspace

setWorkspace( integer $workspace_id ) : \modWorkspace

Allows for customization of the package workspace.

Arguments
$workspace_id
integer
The ID of the workspace to select.
Output
\modWorkspace
The workspace set, false if invalid.
Details
visibility
public
final
false
static
false
access
public
Documentation was generated by DocBlox 0.11.2.