API Documentation

Dojo/BuildLayer.php

Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Dojo
version
$Id: BuildLayer.php 22279 2010-05-24 20:38:52Z matthew $
Classes
Zend_Dojo_BuildLayer

Description

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.

Zend_Dojo_BuildLayer

copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Dojo
Properties
$_consumeJavascript
$_consumeOnLoad
$_dojo
$_layerName
$_layerScriptPath
$_profileOptions
$_profilePrefixes
$_view
Methods
__construct
setOptions
setView
getView
setDojoHelper
getDojoHelper
setLayerName
getLayerName
setLayerScriptPath
getLayerScriptPath
setConsumeJavascript
consumeJavascript
setConsumeOnLoad
consumeOnLoad
setProfileOptions
addProfileOptions
addProfileOption
hasProfileOption
getProfileOption
getProfileOptions
removeProfileOption
clearProfileOptions
addProfilePrefix
setProfilePrefixes
getProfilePrefixes
generateLayerScript
generateBuildProfile
_getPrefix
_filterJsonProfileToJavascript

Description

Dojo module layer and custom build profile generation support

Properties

$_consumeJavascript

bool $_consumeJavascript = 'false'

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

Details

$_consumeJavascript
bool
visibility
protected
default
false
final
false
static
false

$_consumeOnLoad

bool $_consumeOnLoad = 'false'

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

Details

$_consumeOnLoad
bool
visibility
protected
default
false
final
false
static
false

$_dojo

Zend_Dojo_View_Helper_Dojo_Container $_dojo = ''

Dojo view helper reference

Details

$_dojo
Zend_Dojo_View_Helper_Dojo_Container
visibility
protected
default
final
false
static
false

$_layerName

string $_layerName = ''

Name of the custom layer to generate

Details

$_layerName
string
visibility
protected
default
final
false
static
false

$_layerScriptPath

string $_layerScriptPath = ''

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

Details

$_layerScriptPath
string
visibility
protected
default
final
false
static
false

$_profileOptions

array $_profileOptions = 'array'

Build profile options

Details

$_profileOptions
array
visibility
protected
default
array
final
false
static
false

$_profilePrefixes

array $_profilePrefixes = 'array'

Associative array of module/path pairs for the build profile

Details

$_profilePrefixes
array
visibility
protected
default
array
final
false
static
false

$_view

Zend_View_Interface $_view = ''

Zend_View reference

Details

$_view
Zend_View_Interface
visibility
protected
default
final
false
static
false

Methods

__construct

__construct( array|Zend_Config $options = null ) : void

Constructor

Arguments
$options
arrayZend_Config
Details
visibility
public
final
false
static
false
throws
for invalid option argument

_filterJsonProfileToJavascript

_filterJsonProfileToJavascript( string $profile ) : string

Filter a JSON build profile to JavaScript

Arguments
$profile
string
Output
string
Details
visibility
protected
final
false
static
false

_getPrefix

_getPrefix( string $module ) : void

Retrieve module prefix

Arguments
$module
string
Details
visibility
protected
final
false
static
false

addProfileOption

addProfileOption( string $key, value $value ) : Zend_Dojo_BuildLayer

Add a single build profile option

Arguments
$key
string
$value
value
Details
visibility
public
final
false
static
false

addProfileOptions

addProfileOptions( array $options ) : Zend_Dojo_BuildLayer

Add many build profile options at once

Arguments
$options
array
Details
visibility
public
final
false
static
false

addProfilePrefix

addProfilePrefix( 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".

Arguments
$prefix
string
$path
nullstring
Details
visibility
public
final
false
static
false

clearProfileOptions

clearProfileOptions( ) : Zend_Dojo_BuildLayer

Remove all build profile options

Details
visibility
public
final
false
static
false

consumeJavascript

consumeJavascript( ) : bool

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

Output
bool
Details
visibility
public
final
false
static
false

consumeOnLoad

consumeOnLoad( ) : bool

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

Output
bool
Details
visibility
public
final
false
static
false

generateBuildProfile

generateBuildProfile( ) : string

Generate build profile

Output
string
Details
visibility
public
final
false
static
false

generateLayerScript

generateLayerScript( ) : string

Generate module layer script

Output
string
Details
visibility
public
final
false
static
false

getDojoHelper

getDojoHelper( ) : Zend_Dojo_View_Helper_Dojo_Container

Retrieve dojo() view helper instance

Will retrieve it from the view object if not registered.

Details
visibility
public
final
false
static
false
throws
if not registered and no view object found

getLayerName

getLayerName( ) : string|null

Retrieve custom layer name

Output
string|null
Details
visibility
public
final
false
static
false

getLayerScriptPath

getLayerScriptPath( ) : string|null

Get custom layer script path

Output
string|null
Details
visibility
public
final
false
static
false

getProfileOption

getProfileOption( string $key ) : mixed

Retrieve a single build profile option

Returns null if profile option does not exist.

Arguments
$key
string
Output
mixed
Details
visibility
public
final
false
static
false

getProfileOptions

getProfileOptions( ) : array

Get all build profile options

Output
array
Details
visibility
public
final
false
static
false

getProfilePrefixes

getProfilePrefixes( ) : array

Get build profile dependency prefixes

Output
array
Details
visibility
public
final
false
static
false

getView

getView( ) : Zend_View_Interface|null

Retrieve view object

Output
Zend_View_Interface|null
Details
visibility
public
final
false
static
false

hasProfileOption

hasProfileOption( string $key ) : bool

Is a given build profile option set?

Arguments
$key
string
Output
bool
Details
visibility
public
final
false
static
false

removeProfileOption

removeProfileOption( string $name ) : Zend_Dojo_BuildLayer

Remove a build profile option

Arguments
$name
string
Details
visibility
public
final
false
static
false

setConsumeJavascript

setConsumeJavascript( bool $flag ) : Zend_Dojo_BuildLayer

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

Arguments
$flag
bool
Details
visibility
public
final
false
static
false

setConsumeOnLoad

setConsumeOnLoad( bool $flag ) : Zend_Dojo_BuildLayer

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

Arguments
$flag
bool
Details
visibility
public
final
false
static
false

setDojoHelper

setDojoHelper( Zend_Dojo_View_Helper_Dojo_Container $helper ) : Zend_Dojo_BuildLayer

Set dojo() view helper instance

Arguments
$helper
Zend_Dojo_View_Helper_Dojo_Container
Details
visibility
public
final
false
static
false

setLayerName

setLayerName( string $name ) : Zend_Dojo_BuildLayer

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

Arguments
$name
string
Details
visibility
public
final
false
static
false

setLayerScriptPath

setLayerScriptPath( string $path ) : Zend_Dojo_BuildLayer

Set the path to the custom layer script

Should be a path relative to dojo.js

Arguments
$path
string
Details
visibility
public
final
false
static
false

setOptions

setOptions( array $options ) : Zend_Dojo_BuildLayer

Set options

Proxies to any setter that matches an option key.

Arguments
$options
array
Details
visibility
public
final
false
static
false

setProfileOptions

setProfileOptions( array $options ) : Zend_Dojo_BuildLayer

Set many build profile options at once

Arguments
$options
array
Details
visibility
public
final
false
static
false

setProfilePrefixes

setProfilePrefixes( array $prefixes ) : Zend_Dojo_BuildLayer

Set multiple dependency prefixes for bulid profile

Arguments
$prefixes
array
Details
visibility
public
final
false
static
false

setView

setView( Zend_View_Interface $view ) : Zend_Dojo_BuildLayer

Set View object

Arguments
$view
Zend_View_Interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.