API Documentation

Zend/Dojo/BuildLayer.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Dojo  
Version
$Id: BuildLayer.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Dojo_BuildLayer

Package: Zend\Dojo

Dojo module layer and custom build profile generation support

Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedbool  $_consumeJavascript= 'false'

Flag: whether or not to consume JS aggregated in the dojo() view helper when generate the module layer contents

Default valuefalseDetails
Type
bool
Propertyprotectedbool  $_consumeOnLoad= 'false'

Flag: whether or not to consume dojo.addOnLoad events registered with the dojo() view helper when generating the module layer file contents

Default valuefalseDetails
Type
bool
Propertyprotected\Zend_Dojo_View_Helper_Dojo_Container  $_dojo= ''

Dojo view helper reference

Propertyprotectedstring  $_layerName= ''

Name of the custom layer to generate

Details
Type
string
Propertyprotectedstring  $_layerScriptPath= ''

Path to the custom layer script relative to dojo.js (used when creating the build profile)

Details
Type
string
Propertyprotectedarray  $_profileOptions= 'array( 'action' => 'release''

Build profile options

Default valuearray( 'action' => 'release'Details
Type
array
Propertyprotectedarray  $_profilePrefixes= 'array()'

Associative array of module/path pairs for the build profile

Default valuearray()Details
Type
array
Propertyprotected\Zend_View_Interface  $_view= ''

Zend_View reference

Details
Type
\Zend_View_Interface

Methods

methodpublic__construct( array|\Zend_Config $options = null ) : void

Constructor

Parameters
Name Type Description
$options array|\Zend_Config
Throws
Exception Description
\Zend_Dojo_Exception for invalid option argument
methodprotected_filterJsonProfileToJavascript( string $profile ) : string

Filter a JSON build profile to JavaScript

Parameters
Name Type Description
$profile string
Returns
Type Description
string
methodprotected_getPrefix( string $module ) : void

Retrieve module prefix

Parameters
Name Type Description
$module string
methodpublicaddProfileOption( string $key, \value $value ) : \Zend_Dojo_BuildLayer

Add a single build profile option

Parameters
Name Type Description
$key string
$value \value
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicaddProfileOptions( array $options ) : \Zend_Dojo_BuildLayer

Add many build profile options at once

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicaddProfilePrefix( string $prefix, null|string $path = null ) : \Zend_Dojo_BuildLayer

Add a build profile dependency prefix

If just the prefix is passed, sets path to "../$prefix".

Parameters
Name Type Description
$prefix string
$path null|string
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicclearProfileOptions( ) : \Zend_Dojo_BuildLayer

Remove all build profile options

Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicconsumeJavascript( ) : bool

Get flag indicating whether or not to consume JS aggregated in dojo() view helper

Returns
Type Description
bool
methodpublicconsumeOnLoad( ) : bool

Get flag indicating whether or not to consume dojo.addOnLoad events aggregated in dojo() view helper

Returns
Type Description
bool
methodpublicgenerateBuildProfile( ) : string

Generate build profile

Returns
Type Description
string
methodpublicgenerateLayerScript( ) : string

Generate module layer script

Returns
Type Description
string
methodpublicgetDojoHelper( ) : \Zend_Dojo_View_Helper_Dojo_Container

Retrieve dojo() view helper instance

Will retrieve it from the view object if not registered.

Returns
Type Description
\Zend_Dojo_View_Helper_Dojo_Container
Throws
Exception Description
\Zend_Dojo_Exception if not registered and no view object found
methodpublicgetLayerName( ) : string|null

Retrieve custom layer name

Returns
Type Description
string|null
methodpublicgetLayerScriptPath( ) : string|null

Get custom layer script path

Returns
Type Description
string|null
methodpublicgetProfileOption( string $key ) : mixed

Retrieve a single build profile option

Returns null if profile option does not exist.

Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetProfileOptions( ) : array

Get all build profile options

Returns
Type Description
array
methodpublicgetProfilePrefixes( ) : array

Get build profile dependency prefixes

Returns
Type Description
array
methodpublicgetView( ) : \Zend_View_Interface|null

Retrieve view object

Returns
Type Description
\Zend_View_Interface|null
methodpublichasProfileOption( string $key ) : bool

Is a given build profile option set?

Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublicremoveProfileOption( string $name ) : \Zend_Dojo_BuildLayer

Remove a build profile option

Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetConsumeJavascript( bool $flag ) : \Zend_Dojo_BuildLayer

Set flag indicating whether or not to consume JS aggregated in dojo() view helper

Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetConsumeOnLoad( bool $flag ) : \Zend_Dojo_BuildLayer

Set flag indicating whether or not to consume dojo.addOnLoad events aggregated in dojo() view helper

Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetDojoHelper( \Zend_Dojo_View_Helper_Dojo_Container $helper ) : \Zend_Dojo_BuildLayer

Set dojo() view helper instance

Parameters
Name Type Description
$helper \Zend_Dojo_View_Helper_Dojo_Container
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetLayerName( string $name ) : \Zend_Dojo_BuildLayer

Set custom layer name; e.g. "custom.main"

Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetLayerScriptPath( string $path ) : \Zend_Dojo_BuildLayer

Set the path to the custom layer script

Should be a path relative to dojo.js

Parameters
Name Type Description
$path string
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetOptions( array $options ) : \Zend_Dojo_BuildLayer

Set options

Proxies to any setter that matches an option key.

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetProfileOptions( array $options ) : \Zend_Dojo_BuildLayer

Set many build profile options at once

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetProfilePrefixes( array $prefixes ) : \Zend_Dojo_BuildLayer

Set multiple dependency prefixes for bulid profile

Parameters
Name Type Description
$prefixes array
Returns
Type Description
\Zend_Dojo_BuildLayer
methodpublicsetView( \Zend_View_Interface $view ) : \Zend_Dojo_BuildLayer

Set View object

Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
\Zend_Dojo_BuildLayer
Documentation was generated by DocBlox 0.15.1.