View/Helper/InlineScript.php
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_View
- Subpackage
- Helper
- Version
- $Id: InlineScript.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_View_Helper_InlineScript
- Parent(s)
- \Zend_View_Helper_HeadScript < \Zend_View_Helper_Placeholder_Container_Standalone < \Zend_View_Helper_Abstract
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
- \global\Zend_View_Helper_Head_Script
Constants
FILE
= 'FILE'- Inherited_from
- \Zend_View_Helper_HeadScript::FILE
SCRIPT
= 'SCRIPT'- Inherited_from
- \Zend_View_Helper_HeadScript::SCRIPT
Properties

bool $_arbitraryAttributes = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_arbitraryAttributes

\book $_autoEscape = truetrueDetails- Type
- \book
- Inherited_from
- \Zend_View_Helper_Placeholder_Container_Standalone::$$_autoEscape
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_autoEscape

$_captureLock- Type
- n/a
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_captureLock

$_captureScriptAttrs = nullnullDetails- Type
- n/a
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_captureScriptAttrs

$_captureScriptType = nullnullDetails- Type
- n/a
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_captureScriptType

$_captureType- Type
- n/a
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_captureType

\Zend_View_Helper_Placeholder_Container_Abstract $_container
array $_optionalAttributes = array('charset', 'defer', 'language', 'src')array('charset', 'defer', 'language', 'src')Details- Type
- array
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_optionalAttributes

string $_regKey = 'Zend_View_Helper_InlineScript''Zend_View_Helper_InlineScript'Details- Type
- string

\Zend_View_Helper_Placeholder_Registry $_registry
string $_requiredAttributes = array('type')array('type')Details- Type
- string
- Inherited_from
- \Zend_View_Helper_HeadScript::$$_requiredAttributes

bool $useCdata = falsefalseDetails- Type
- bool
- Inherited_from
- \Zend_View_Helper_HeadScript::$$useCdata

\Zend_View_Interface $view = nullnullDetails- Type
- \Zend_View_Interface
- Inherited_from
- \Zend_View_Helper_Abstract::$$view
- Inherited_from
- \Zend_View_Helper_Placeholder_Container_Standalone::$$view
- Inherited_from
- \Zend_View_Helper_HeadScript::$$view
Methods

__call(string $method, array $args) : \Zend_View_Helper_HeadScriptAllows the following method calls: - appendFile($src, $type = 'text/javascript', $attrs = array()) - offsetSetFile($index, $src, $type = 'text/javascript', $attrs = array()) - prependFile($src, $type = 'text/javascript', $attrs = array()) - setFile($src, $type = 'text/javascript', $attrs = array()) - appendScript($script, $type = 'text/javascript', $attrs = array()) - offsetSetScript($index, $src, $type = 'text/javascript', $attrs = array()) - prependScript($script, $type = 'text/javascript', $attrs = array()) - setScript($script, $type = 'text/javascript', $attrs = array())
| Name | Type | Description |
|---|---|---|
| $method | string | |
| $args | array |
| Type | Description |
|---|---|
| \Zend_View_Helper_HeadScript |
| Exception | Description |
|---|---|
| \Zend_View_Exception | if too few arguments or invalid method |

__get(string $key) : mixedOverloading: retrieve property
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__get()\Zend_View_Helper_HeadScript::__get()| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| mixed |

__isset(string $key) : boolOverloading: check if property is set
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__isset()\Zend_View_Helper_HeadScript::__isset()| Name | Type | Description |
|---|---|---|
| $key | string |
| Type | Description |
|---|---|
| bool |

__set(string $key, mixed $value) : voidOverloading: set property value
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__set()\Zend_View_Helper_HeadScript::__set()| Name | Type | Description |
|---|---|---|
| $key | string | |
| $value | mixed |

__toString() : stringCast to string representation
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__toString()\Zend_View_Helper_HeadScript::__toString()| Type | Description |
|---|---|
| string |

__unset(string $key) : voidOverloading: unset property
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__unset()\Zend_View_Helper_HeadScript::__unset()| Name | Type | Description |
|---|---|---|
| $key | string |

_escape(string $string) : stringEscape a string
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::_escape()\Zend_View_Helper_HeadScript::_escape()| Name | Type | Description |
|---|---|---|
| $string | string |
| Type | Description |
|---|---|
| string |

_isDuplicate(string $file) : boolIs the file specified a duplicate?
Inherited from: \Zend_View_Helper_HeadScript::_isDuplicate()| Name | Type | Description |
|---|---|---|
| $file | string |
| Type | Description |
|---|---|
| bool |

arbitraryAttributesAllowed() : boolAre arbitrary attributes allowed?
Inherited from: \Zend_View_Helper_HeadScript::arbitraryAttributesAllowed()| Type | Description |
|---|---|
| bool |

captureStart(mixed $captureType = \Zend_View_Helper_Placeholder_Container_Abstract::APPEND, $type = 'text/javascript', $attrs = array()) : void| Name | Type | Description |
|---|---|---|
| $captureType | mixed | |
| $type | ||
| $attrs |

count() : intCountable
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::count()\Zend_View_Helper_HeadScript::count()| Type | Description |
|---|---|
| int |

createData(string $type, array $attributes, string $content = null) : \stdClassCreate data item containing all necessary components of script
Inherited from: \Zend_View_Helper_HeadScript::createData()| Name | Type | Description |
|---|---|---|
| $type | string | |
| $attributes | array | |
| $content | string |
| Type | Description |
|---|---|
| \stdClass |

direct() : voidStrategy pattern: currently unutilized
Inherited from: \Zend_View_Helper_Abstract::direct()\Zend_View_Helper_Placeholder_Container_Standalone::direct()\Zend_View_Helper_HeadScript::direct()
getAutoEscape() : voidReturn whether autoEscaping is enabled or disabled
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getAutoEscape()\Zend_View_Helper_HeadScript::getAutoEscape()return bool

getContainer() : \Zend_View_Helper_Placeholder_Container_AbstractRetrieve placeholder container
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getContainer()\Zend_View_Helper_HeadScript::getContainer()| Type | Description |
|---|---|
| \Zend_View_Helper_Placeholder_Container_Abstract |

getIterator() : \IteratorIteratorAggregate: get Iterator
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getIterator()\Zend_View_Helper_HeadScript::getIterator()| Type | Description |
|---|---|
| \Iterator |

getRegistry() : \Zend_View_Helper_Placeholder_RegistryRetrieve registry
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getRegistry()\Zend_View_Helper_HeadScript::getRegistry()| Type | Description |
|---|---|
| \Zend_View_Helper_Placeholder_Registry |

headScript(string $mode = \Zend_View_Helper_HeadScript::FILE, string $spec = null, string $placement = 'APPEND', array $attrs = array(), string $type = 'text/javascript') : \Zend_View_Helper_HeadScriptReturns headScript helper object; optionally, allows specifying a script or script file to include.
| Name | Type | Description |
|---|---|---|
| $mode | string | Script or file |
| $spec | string | Script/url |
| $placement | string | Append, prepend, or set |
| $attrs | array | Array of script attributes |
| $type | string | Script type and/or array of script attributes |
| Type | Description |
|---|---|
| \Zend_View_Helper_HeadScript |

inlineScript(string $mode = \Zend_View_Helper_HeadScript::FILE, string $spec = null, string $placement = 'APPEND', array $attrs = array(), string $type = 'text/javascript') : \Zend_View_Helper_InlineScriptReturn InlineScript object
Returns InlineScript helper object; optionally, allows specifying a script or script file to include.
| Name | Type | Description |
|---|---|---|
| $mode | string | Script or file |
| $spec | string | Script/url |
| $placement | string | Append, prepend, or set |
| $attrs | array | Array of script attributes |
| $type | string | Script type and/or array of script attributes |
| Type | Description |
|---|---|
| \Zend_View_Helper_InlineScript |

itemToString( $item, string | int $indent, $escapeStart, $escapeEnd) : string| Name | Type | Description |
|---|---|---|
| $item | ||
| $indent | string | int | |
| $escapeStart | ||
| $escapeEnd |
| Type | Description |
|---|---|
| string |

offsetExists(string | int $offset) : boolArrayAccess: offsetExists
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::offsetExists()\Zend_View_Helper_HeadScript::offsetExists()| Name | Type | Description |
|---|---|---|
| $offset | string | int |
| Type | Description |
|---|---|
| bool |

offsetGet(string | int $offset) : mixedArrayAccess: offsetGet
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::offsetGet()\Zend_View_Helper_HeadScript::offsetGet()| Name | Type | Description |
|---|---|---|
| $offset | string | int |
| Type | Description |
|---|---|
| mixed |

offsetSet(string | int $index, mixed $value) : void| Name | Type | Description |
|---|---|---|
| $index | string | int | |
| $value | mixed |

offsetUnset(string | int $offset) : voidArrayAccess: offsetUnset
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::offsetUnset()\Zend_View_Helper_HeadScript::offsetUnset()| Name | Type | Description |
|---|---|---|
| $offset | string | int |

setAllowArbitraryAttributes(bool $flag) : \Zend_View_Helper_HeadScriptSet flag indicating if arbitrary attributes are allowed
Inherited from: \Zend_View_Helper_HeadScript::setAllowArbitraryAttributes()| Name | Type | Description |
|---|---|---|
| $flag | bool |
| Type | Description |
|---|---|
| \Zend_View_Helper_HeadScript |

setAutoEscape(bool $autoEscape = true) : \Zend_View_Helper_Placeholder_Container_StandaloneSet whether or not auto escaping should be used
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::setAutoEscape()\Zend_View_Helper_HeadScript::setAutoEscape()| Name | Type | Description |
|---|---|---|
| $autoEscape | bool | whether or not to auto escape output |
| Type | Description |
|---|---|
| \Zend_View_Helper_Placeholder_Container_Standalone |

setContainer(\Zend_View_Helper_Placeholder_Container_Abstract $container) : \Zend_View_Helper_Placeholder_Container_StandaloneSet container on which to operate
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::setContainer()\Zend_View_Helper_HeadScript::setContainer()| Name | Type | Description |
|---|---|---|
| $container | \Zend_View_Helper_Placeholder_Container_Abstract |
| Type | Description |
|---|---|
| \Zend_View_Helper_Placeholder_Container_Standalone |

setRegistry(\Zend_View_Helper_Placeholder_Registry $registry) : \Zend_View_Helper_Placeholder_Container_StandaloneSet registry object
Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::setRegistry()\Zend_View_Helper_HeadScript::setRegistry()| Name | Type | Description |
|---|---|---|
| $registry | \Zend_View_Helper_Placeholder_Registry |
| Type | Description |
|---|---|
| \Zend_View_Helper_Placeholder_Container_Standalone |

setView(\Zend_View_Interface $view) : \Zend_View_Helper_AbstractSet the View object
Inherited from: \Zend_View_Helper_Abstract::setView()\Zend_View_Helper_Placeholder_Container_Standalone::setView()\Zend_View_Helper_HeadScript::setView()| Name | Type | Description |
|---|---|---|
| $view | \Zend_View_Interface |
| Type | Description |
|---|---|
| \Zend_View_Helper_Abstract |