Public Member Functions | |
__construct () | |
headScript ($mode=Zend_View_Helper_HeadScript::FILE, $spec=null, $placement= 'APPEND', array $attrs=array(), $type= 'text/javascript') | |
captureStart ($captureType=Zend_View_Helper_Placeholder_Container_Abstract::APPEND, $type= 'text/javascript', $attrs=array()) | |
captureEnd () | |
__call ($method, $args) | |
append ($value) | |
prepend ($value) | |
set ($value) | |
offsetSet ($index, $value) | |
setAllowArbitraryAttributes ($flag) | |
arbitraryAttributesAllowed () | |
itemToString ($item, $indent, $escapeStart, $escapeEnd) | |
toString ($indent=null) | |
createData ($type, array $attributes, $content=null) | |
Data Fields | |
const | FILE = 'FILE' |
const | SCRIPT = 'SCRIPT' |
$useCdata = false | |
Protected Member Functions | |
_isDuplicate ($file) | |
_isValid ($value) | |
Protected Attributes | |
$_regKey = 'Zend_View_Helper_HeadScript' | |
$_arbitraryAttributes = false | |
$_captureLock | |
$_captureScriptType = null | |
$_captureScriptAttrs = null | |
$_captureType | |
$_optionalAttributes | |
$_requiredAttributes = array('type') |
Definition at line 35 of file HeadScript.php.
__construct | ( | ) |
Constructor
Set separator to PHP_EOL.
Reimplemented from Zend_View_Helper_Placeholder_Container_Standalone.
Definition at line 95 of file HeadScript.php.
__call | ( | $ | method, |
$ | args | ||
) |
Overload method access
Allows the following method calls:
string | $method | |
array | $args |
Zend_View_Exception | if too few arguments or invalid method |
Reimplemented from Zend_View_Helper_Placeholder_Container_Standalone.
Definition at line 201 of file HeadScript.php.
_isDuplicate | ( | $ | file ) | [protected] |
Is the file specified a duplicate?
string | $file |
Definition at line 266 of file HeadScript.php.
_isValid | ( | $ | value ) | [protected] |
Is the script provided valid?
mixed | $value | |
string | $method |
Definition at line 286 of file HeadScript.php.
append | ( | $ | value ) |
Override append
string | $value |
Definition at line 304 of file HeadScript.php.
arbitraryAttributesAllowed | ( | ) |
captureEnd | ( | ) |
captureStart | ( | $ | captureType = Zend_View_Helper_Placeholder_Container_Abstract::APPEND , |
$ | type = 'text/javascript' , |
||
$ | attrs = array() |
||
) |
Start capture action
mixed | $captureType | |
string | $typeOrAttrs |
Definition at line 142 of file HeadScript.php.
createData | ( | $ | type, |
array $ | attributes, | ||
$ | content = null |
||
) |
Create data item containing all necessary components of script
string | $type | |
array | $attributes | |
string | $content |
Definition at line 471 of file HeadScript.php.
headScript | ( | $ | mode = Zend_View_Helper_HeadScript::FILE , |
$ | spec = null , |
||
$ | placement = 'APPEND' , |
||
array $ | attrs = array() , |
||
$ | type = 'text/javascript' |
||
) |
Return headScript object
Returns headScript helper object; optionally, allows specifying a script or script file to include.
string | $mode | Script or file |
string | $spec | Script/url |
string | $placement | Append, prepend, or set |
array | $attrs | Array of script attributes |
string | $type | Script type and/or array of script attributes |
Definition at line 114 of file HeadScript.php.
itemToString | ( | $ | item, |
$ | indent, | ||
$ | escapeStart, | ||
$ | escapeEnd | ||
) |
Create script HTML
string | $type | |
array | $attributes | |
string | $content | |
string | int | $indent |
Definition at line 395 of file HeadScript.php.
offsetSet | ( | $ | index, |
$ | value | ||
) |
Override offsetSet
string | int | $index | |
mixed | $value |
Reimplemented from Zend_View_Helper_Placeholder_Container_Standalone.
Definition at line 353 of file HeadScript.php.
prepend | ( | $ | value ) |
Override prepend
string | $value |
Definition at line 320 of file HeadScript.php.
set | ( | $ | value ) |
setAllowArbitraryAttributes | ( | $ | flag ) |
Set flag indicating if arbitrary attributes are allowed
bool | $flag |
Definition at line 370 of file HeadScript.php.
toString | ( | $ | indent = null ) |
Retrieve string representation
string | int | $indent |
Definition at line 435 of file HeadScript.php.
$_optionalAttributes [protected] |
array( 'charset', 'defer', 'language', 'src' )
Definition at line 71 of file HeadScript.php.
#@+ Script type contants string
Definition at line 41 of file HeadScript.php.