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.
Dojo module layer and custom build profile generation support

bool
$_consumeJavascript= 'false'
Flag: whether or not to consume JS aggregated in the dojo() view helper when generate the module layer contents
false
Details
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
false
Details
string
$_layerScriptPath= ''
Path to the custom layer script relative to dojo.js (used when creating the build profile)

array
$_profileOptions= 'array(
'action' => 'release''
Build profile options
array(
'action' => 'release'
Details
array
$_profilePrefixes= 'array()'
Associative array of module/path pairs for the build profile
array()
Details
__construct(
array|\Zend_Config $options
=
null
)
:
void
Constructor
Name | Type | Description |
---|---|---|
$options | array|\Zend_Config |
Exception | Description |
---|---|
\Zend_Dojo_Exception | for invalid option argument |

_filterJsonProfileToJavascript(
string $profile
)
:
string
Filter a JSON build profile to JavaScript
Name | Type | Description |
---|---|---|
$profile | string |
Type | Description |
---|---|
string |

_getPrefix(
string $module
)
:
void
Retrieve module prefix
Name | Type | Description |
---|---|---|
$module | string |

addProfileOption(
string $key, \value $value
)
:
\Zend_Dojo_BuildLayer
Add a single build profile option
Name | Type | Description |
---|---|---|
$key | string | |
$value | \value |
Type | Description |
---|---|
\Zend_Dojo_BuildLayer |

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".
Name | Type | Description |
---|---|---|
$prefix | string | |
$path | null|string |
Type | Description |
---|---|
\Zend_Dojo_BuildLayer |

clearProfileOptions(
)
:
\Zend_Dojo_BuildLayer
Remove all build profile options
Type | Description |
---|---|
\Zend_Dojo_BuildLayer |

consumeJavascript(
)
:
bool
Get flag indicating whether or not to consume JS aggregated in dojo() view helper
Type | Description |
---|---|
bool |

consumeOnLoad(
)
:
bool
Get flag indicating whether or not to consume dojo.addOnLoad events aggregated in dojo() view helper
Type | Description |
---|---|
bool |

getDojoHelper(
)
:
\Zend_Dojo_View_Helper_Dojo_Container
Retrieve dojo() view helper instance
Will retrieve it from the view object if not registered.
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |
Exception | Description |
---|---|
\Zend_Dojo_Exception | if not registered and no view object found |

getLayerScriptPath(
)
:
string|null
Get custom layer script path
Type | Description |
---|---|
string|null |

getProfileOption(
string $key
)
:
mixed
Retrieve a single build profile option
Returns null if profile option does not exist.
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
mixed |

getView(
)
:
\Zend_View_Interface|null
Retrieve view object
Type | Description |
---|---|
\Zend_View_Interface|null |

hasProfileOption(
string $key
)
:
bool
Is a given build profile option set?
Name | Type | Description |
---|---|---|
$key | string |
Type | Description |
---|---|
bool |

setConsumeJavascript(
bool $flag
)
:
\Zend_Dojo_BuildLayer
Set flag indicating whether or not to consume JS aggregated in dojo() view helper

setConsumeOnLoad(
bool $flag
)
:
\Zend_Dojo_BuildLayer
Set flag indicating whether or not to consume dojo.addOnLoad events aggregated in dojo() view helper

setDojoHelper(
\Zend_Dojo_View_Helper_Dojo_Container $helper
)
:
\Zend_Dojo_BuildLayer
Set dojo() view helper instance
Name | Type | Description |
---|---|---|
$helper | \Zend_Dojo_View_Helper_Dojo_Container |
Type | Description |
---|---|
\Zend_Dojo_BuildLayer |

setLayerScriptPath(
string $path
)
:
\Zend_Dojo_BuildLayer
Set the path to the custom layer script
Should be a path relative to dojo.js
Name | Type | Description |
---|---|---|
$path | string |
Type | Description |
---|---|
\Zend_Dojo_BuildLayer |

setOptions(
array $options
)
:
\Zend_Dojo_BuildLayer
Set options
Proxies to any setter that matches an option key.
Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Dojo_BuildLayer |

setProfilePrefixes(
array $prefixes
)
:
\Zend_Dojo_BuildLayer
Set multiple dependency prefixes for bulid profile

setView(
\Zend_View_Interface $view
)
:
\Zend_Dojo_BuildLayer
Set View object
Name | Type | Description |
---|---|---|
$view | \Zend_View_Interface |
Type | Description |
---|---|
\Zend_Dojo_BuildLayer |