Helper for setting and retrieving script elements for inclusion in HTML body section

package Zend_View
subpackage Helper

 Methods

Overload method access

__call(string $method, array $args) : \Zend\View\Helper\HeadScript
Inherited

Allows 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())

inherited_from \Zend\View\Helper\HeadScript::__call()

Parameters

$method

string

Method to call

$args

array

Arguments of method

Exceptions

\Zend\View\Exception\BadMethodCallException if too few arguments or invalid method

Returns

Constructor

__construct() 
Inherited

Set separator to PHP_EOL.

inherited_from \Zend\View\Helper\HeadScript::__construct()

Overloading: retrieve property

__get(string $key) : mixed
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::__get()
inherited_from \Zend\View\Helper\HeadScript::__get()

Parameters

$key

string

Returns

mixed

Return InlineScript object

__invoke(string $mode, string $spec, string $placement, array $attrs, string $type) : \Zend\View\Helper\InlineScript

Returns InlineScript helper object; optionally, allows specifying a script or script file to include.

Parameters

$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

Returns

Overloading: check if property is set

__isset(string $key) : bool
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::__isset()
inherited_from \Zend\View\Helper\HeadScript::__isset()

Parameters

$key

string

Returns

bool

Overloading: set property value

__set(string $key, mixed $value) : void
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::__set()
inherited_from \Zend\View\Helper\HeadScript::__set()

Parameters

$key

string

$value

mixed

Cast to string representation

__toString() : string
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::__toString()
inherited_from \Zend\View\Helper\HeadScript::__toString()

Returns

string

Overloading: unset property

__unset(string $key) : void
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::__unset()
inherited_from \Zend\View\Helper\HeadScript::__unset()

Parameters

$key

string

Override append

append(string $value) : void
Inherited

inherited_from \Zend\View\Helper\HeadScript::append()

Parameters

$value

string

Append script or file

Exceptions

\Zend\View\Exception\InvalidArgumentException

Are arbitrary attributes allowed?

arbitraryAttributesAllowed() : bool
Inherited

inherited_from \Zend\View\Helper\HeadScript::arbitraryAttributesAllowed()

Returns

bool

End capture action and store

captureEnd() : void
Inherited

inherited_from \Zend\View\Helper\HeadScript::captureEnd()

Start capture action

captureStart(mixed $captureType, string $type, array $attrs) : void
Inherited

inherited_from \Zend\View\Helper\HeadScript::captureStart()

Parameters

$captureType

mixed

Type of capture

$type

string

Type of script

$attrs

array

Attributes of capture

Exceptions

\Zend\View\Exception\RuntimeException

Countable

count() : int
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::count()
inherited_from \Zend\View\Helper\HeadScript::count()

Returns

int

Create data item containing all necessary components of script

createData(string $type, array $attributes, string $content) : \stdClass
Inherited

inherited_from \Zend\View\Helper\HeadScript::createData()

Parameters

$type

string

Type of data

$attributes

array

Attributes of data

$content

string

Content of data

Returns

Return whether autoEscaping is enabled or disabled

getAutoEscape() 
Inherited

return bool

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::getAutoEscape()
inherited_from \Zend\View\Helper\HeadScript::getAutoEscape()

Retrieve placeholder container

getContainer() : \Zend\View\Helper\Placeholder\Container\AbstractContainer
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::getContainer()
inherited_from \Zend\View\Helper\HeadScript::getContainer()

Returns

Get Escaper instance

getEscaper($enc) : mixed
Inherited

Lazy-loads one if none available

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::getEscaper()
inherited_from \Zend\View\Helper\HeadScript::getEscaper()

Parameters

$enc

Returns

mixed

IteratorAggregate: get Iterator

getIterator() : \Iterator
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::getIterator()
inherited_from \Zend\View\Helper\HeadScript::getIterator()

Returns

\Iterator

Retrieve registry

getRegistry() : \Zend\View\Helper\Placeholder\Registry
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::getRegistry()
inherited_from \Zend\View\Helper\HeadScript::getRegistry()

Returns

Get the view object

getView() : null | \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::getView()
inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::getView()
inherited_from \Zend\View\Helper\HeadScript::getView()

Returns

Create script HTML

itemToString(mixed $item, string $indent, string $escapeStart, string $escapeEnd) : string
Inherited

inherited_from \Zend\View\Helper\HeadScript::itemToString()

Parameters

$item

mixed

Item to convert

$indent

string

String to add before the item

$escapeStart

string

Starting sequence

$escapeEnd

string

Ending sequence

Returns

string

ArrayAccess: offsetExists

offsetExists(string | int $offset) : bool
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::offsetExists()
inherited_from \Zend\View\Helper\HeadScript::offsetExists()

Parameters

$offset

stringint

Returns

bool

ArrayAccess: offsetGet

offsetGet(string | int $offset) : mixed
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::offsetGet()
inherited_from \Zend\View\Helper\HeadScript::offsetGet()

Parameters

$offset

stringint

Returns

mixed

Override offsetSet

offsetSet(string | int $index, mixed $value) : void
Inherited

inherited_from \Zend\View\Helper\HeadScript::offsetSet()

Parameters

$index

stringint

Set script of file offset

$value

mixed

Exceptions

\Zend\View\Exception\InvalidArgumentException

ArrayAccess: offsetUnset

offsetUnset(string | int $offset) : void
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::offsetUnset()
inherited_from \Zend\View\Helper\HeadScript::offsetUnset()

Parameters

$offset

stringint

Override prepend

prepend(string $value) : void
Inherited

inherited_from \Zend\View\Helper\HeadScript::prepend()

Parameters

$value

string

Prepend script or file

Exceptions

\Zend\View\Exception\InvalidArgumentException

Override set

set(string $value) : void
Inherited

inherited_from \Zend\View\Helper\HeadScript::set()

Parameters

$value

string

Set script or file

Exceptions

\Zend\View\Exception\InvalidArgumentException

Set flag indicating if arbitrary attributes are allowed

setAllowArbitraryAttributes(bool $flag) : \Zend\View\Helper\HeadScript
Inherited

inherited_from \Zend\View\Helper\HeadScript::setAllowArbitraryAttributes()

Parameters

$flag

bool

Set flag

Returns

Set whether or not auto escaping should be used

setAutoEscape(bool $autoEscape) : \Zend\View\Helper\Placeholder\Container\AbstractStandalone
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::setAutoEscape()
inherited_from \Zend\View\Helper\HeadScript::setAutoEscape()

Parameters

$autoEscape

bool

whether or not to auto escape output

Returns

Set container on which to operate

setContainer(\Zend\View\Helper\Placeholder\Container\AbstractContainer $container) : \Zend\View\Helper\Placeholder\Container\AbstractStandalone
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::setContainer()
inherited_from \Zend\View\Helper\HeadScript::setContainer()

Parameters

Returns

Set Escaper instance

setEscaper(\Zend\Escaper\Escaper $escaper) : \Zend\View\Helper\Placeholder\Container\AbstractStandalone
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::setEscaper()
inherited_from \Zend\View\Helper\HeadScript::setEscaper()

Parameters

Returns

Set registry object

setRegistry(\Zend\View\Helper\Placeholder\Registry $registry) : \Zend\View\Helper\Placeholder\Container\AbstractStandalone
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::setRegistry()
inherited_from \Zend\View\Helper\HeadScript::setRegistry()

Parameters

Returns

Set the View object

setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::setView()
inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::setView()
inherited_from \Zend\View\Helper\HeadScript::setView()

Parameters

Returns

Retrieve string representation

toString(string | int $indent) : string
Inherited

inherited_from \Zend\View\Helper\HeadScript::toString()

Parameters

$indent

stringint

Amount of whitespaces or string to use for indention

Returns

string

Escape a string

escape(string $string) : string
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::escape()
inherited_from \Zend\View\Helper\HeadScript::escape()

Parameters

$string

string

Returns

string

Is the file specified a duplicate?

isDuplicate(string $file) : bool
Inherited

inherited_from \Zend\View\Helper\HeadScript::isDuplicate()

Parameters

$file

string

Name of file to check

Returns

bool

Is the script provided valid?

isValid(mixed $value) : bool
Inherited

inherited_from \Zend\View\Helper\HeadScript::isValid()

Parameters

$value

mixed

Is the given script valid?

Returns

bool

 Properties

 

Whether or not to format scripts using CDATA; used only if doctype helper is not accessible

$useCdata : bool
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$useCdata
 

Are arbitrary attributes allowed?

$arbitraryAttributes : bool
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$arbitraryAttributes
 

Flag whether to automatically escape output, must also be enforced in the child class if __toString/toString is overridden

$autoEscape : bool
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::$$autoEscape
inherited_from \Zend\View\Helper\HeadScript::$$autoEscape
 

$captureLock

$captureLock 
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$captureLock
 

$captureScriptAttrs

$captureScriptAttrs 
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$captureScriptAttrs
 

$captureScriptType

$captureScriptType 
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$captureScriptType
 

$captureType

$captureType 
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$captureType
 

$container

$container : \Zend\View\Helper\Placeholder\Container\AbstractContainer
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::$$container
inherited_from \Zend\View\Helper\HeadScript::$$container
 

$escapers

$escapers : \Zend\Escaper\Escaper[]
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::$$escapers
inherited_from \Zend\View\Helper\HeadScript::$$escapers
 

Optional allowed attributes for script tag

$optionalAttributes : array
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$optionalAttributes
 

Registry key for placeholder

$regKey : string

 

$registry

$registry : \Zend\View\Helper\Placeholder\Registry
Inherited

inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::$$registry
inherited_from \Zend\View\Helper\HeadScript::$$registry
 

Required attributes for script tag

$requiredAttributes : string
Inherited

inherited_from \Zend\View\Helper\HeadScript::$$requiredAttributes
 

View object

$view : \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::$$view
inherited_from \Zend\View\Helper\Placeholder\Container\AbstractStandalone::$$view
inherited_from \Zend\View\Helper\HeadScript::$$view

 Constants

 

FILE

FILE 
Inherited

inherited_from \Zend\View\Helper\HeadScript::FILE
 

SCRIPT

SCRIPT 
Inherited

inherited_from \Zend\View\Helper\HeadScript::SCRIPT