View/Helper/InlineScript.php

Show: inherited
Table of Contents

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 [email protected] 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

Package: Zend\View\Helper

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

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

Constant  FILE = 'FILE'
inheritedInherited from: \Zend_View_Helper_HeadScript::FILE
Constant  SCRIPT = 'SCRIPT'
inheritedInherited from: \Zend_View_Helper_HeadScript::SCRIPT

Properties

Propertyprotectedbool $_arbitraryAttributes = false
inherited

Are arbitrary attributes allowed?

Inherited from: \Zend_View_Helper_HeadScript::$$_arbitraryAttributes
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_View_Helper_HeadScript::$$_arbitraryAttributes  
Propertyprotected\book $_autoEscape = true
inherited

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

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::$$_autoEscape\Zend_View_Helper_HeadScript::$$_autoEscape
Default valuetrueDetails
Type
\book
Inherited_from
\Zend_View_Helper_Placeholder_Container_Standalone::$$_autoEscape  
Inherited_from
\Zend_View_Helper_HeadScript::$$_autoEscape  
Propertyprotected$_captureLock =
Details
Type
n/a
Inherited_from
\Zend_View_Helper_HeadScript::$$_captureLock  
Propertyprotected$_captureScriptAttrs = null
Default valuenullDetails
Type
n/a
Inherited_from
\Zend_View_Helper_HeadScript::$$_captureScriptAttrs  
Propertyprotected$_captureScriptType = null
Default valuenullDetails
Type
n/a
Inherited_from
\Zend_View_Helper_HeadScript::$$_captureScriptType  
Propertyprotected$_captureType =
Details
Type
n/a
Inherited_from
\Zend_View_Helper_HeadScript::$$_captureType  
Propertyprotectedarray $_optionalAttributes = array('charset', 'defer', 'language', 'src')
inherited

Optional allowed attributes for script tag

Inherited from: \Zend_View_Helper_HeadScript::$$_optionalAttributes
Default valuearray('charset', 'defer', 'language', 'src')Details
Type
array
Inherited_from
\Zend_View_Helper_HeadScript::$$_optionalAttributes  
Propertyprotectedstring $_regKey = 'Zend_View_Helper_InlineScript'

Registry key for placeholder

Default value'Zend_View_Helper_InlineScript'Details
Type
string
Propertyprotectedstring $_requiredAttributes = array('type')
inherited

Required attributes for script tag

Inherited from: \Zend_View_Helper_HeadScript::$$_requiredAttributes
Default valuearray('type')Details
Type
string
Inherited_from
\Zend_View_Helper_HeadScript::$$_requiredAttributes  
Propertypublicbool $useCdata = false
inherited

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

Inherited from: \Zend_View_Helper_HeadScript::$$useCdata
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_View_Helper_HeadScript::$$useCdata  

Methods

methodpublic__call(string $method, array $args) : \Zend_View_Helper_HeadScript
inherited

Overload method access

Inherited from: \Zend_View_Helper_HeadScript::__call()

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

Parameters
Name Type Description
$method string
$args array
Returns
Type Description
\Zend_View_Helper_HeadScript
Throws
Exception Description
\Zend_View_Exception if too few arguments or invalid method
methodpublic__construct() : void
inherited

Constructor

Inherited from: \Zend_View_Helper_HeadScript::__construct()

Set separator to PHP_EOL.

methodpublic__get(string $key) : mixed
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublic__isset(string $key) : bool
Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublic__set(string $key, mixed $value) : void
Parameters
Name Type Description
$key string
$value mixed
methodpublic__toString() : string
Returns
Type Description
string
methodpublic__unset(string $key) : void
Parameters
Name Type Description
$key string
methodprotected_escape(string $string) : string
Parameters
Name Type Description
$string string
Returns
Type Description
string
methodprotected_isDuplicate(string $file) : bool
inherited

Is the file specified a duplicate?

Inherited from: \Zend_View_Helper_HeadScript::_isDuplicate()
Parameters
Name Type Description
$file string
Returns
Type Description
bool
methodprotected_isValid(mixed $value) : bool
inherited

Is the script provided valid?

Inherited from: \Zend_View_Helper_HeadScript::_isValid()
Parameters
Name Type Description
$value mixed
Returns
Type Description
bool
methodpublicappend(string $value) : void
inherited

Override append

Inherited from: \Zend_View_Helper_HeadScript::append()
Parameters
Name Type Description
$value string
methodpublicarbitraryAttributesAllowed() : bool
inherited

Are arbitrary attributes allowed?

Inherited from: \Zend_View_Helper_HeadScript::arbitraryAttributesAllowed()
Returns
Type Description
bool
methodpubliccaptureEnd() : void
inherited

End capture action and store

Inherited from: \Zend_View_Helper_HeadScript::captureEnd()
methodpubliccaptureStart(mixed $captureType = \Zend_View_Helper_Placeholder_Container_Abstract::APPEND,  $type = 'text/javascript',  $attrs = array()) : void
inherited

Start capture action

Inherited from: \Zend_View_Helper_HeadScript::captureStart()
Parameters
Name Type Description
$captureType mixed
$type
$attrs
methodpubliccount() : int
Returns
Type Description
int
methodpubliccreateData(string $type, array $attributes, string $content = null) : \stdClass
inherited

Create data item containing all necessary components of script

Inherited from: \Zend_View_Helper_HeadScript::createData()
Parameters
Name Type Description
$type string
$attributes array
$content string
Returns
Type Description
\stdClass
methodpublicgetAutoEscape() : void
inherited

Return whether autoEscaping is enabled or disabled

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getAutoEscape()\Zend_View_Helper_HeadScript::getAutoEscape()

return bool

methodpublicgetIterator() : \Iterator
Returns
Type Description
\Iterator
methodpublicheadScript(string $mode = \Zend_View_Helper_HeadScript::FILE, string $spec = null, string $placement = 'APPEND', array $attrs = array(), string $type = 'text/javascript') : \Zend_View_Helper_HeadScript
inherited

Return headScript object

Inherited from: \Zend_View_Helper_HeadScript::headScript()

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

Parameters
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

Returns
Type Description
\Zend_View_Helper_HeadScript
methodpublicinlineScript(string $mode = \Zend_View_Helper_HeadScript::FILE, string $spec = null, string $placement = 'APPEND', array $attrs = array(), string $type = 'text/javascript') : \Zend_View_Helper_InlineScript

Return InlineScript object

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

Parameters
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

Returns
Type Description
\Zend_View_Helper_InlineScript
methodpublicitemToString( $item, string | int $indent,  $escapeStart,  $escapeEnd) : string
inherited

Create script HTML

Inherited from: \Zend_View_Helper_HeadScript::itemToString()
Parameters
Name Type Description
$item
$indent string | int
$escapeStart
$escapeEnd
Returns
Type Description
string
methodpublicoffsetExists(string | int $offset) : bool
Parameters
Name Type Description
$offset string | int
Returns
Type Description
bool
methodpublicoffsetGet(string | int $offset) : mixed
Parameters
Name Type Description
$offset string | int
Returns
Type Description
mixed
methodpublicoffsetSet(string | int $index, mixed $value) : void
inherited

Override offsetSet

Inherited from: \Zend_View_Helper_HeadScript::offsetSet()
Parameters
Name Type Description
$index string | int
$value mixed
methodpublicoffsetUnset(string | int $offset) : void
Parameters
Name Type Description
$offset string | int
methodpublicprepend(string $value) : void
inherited

Override prepend

Inherited from: \Zend_View_Helper_HeadScript::prepend()
Parameters
Name Type Description
$value string
methodpublicset(string $value) : void
inherited

Override set

Inherited from: \Zend_View_Helper_HeadScript::set()
Parameters
Name Type Description
$value string
methodpublicsetAllowArbitraryAttributes(bool $flag) : \Zend_View_Helper_HeadScript
inherited

Set flag indicating if arbitrary attributes are allowed

Inherited from: \Zend_View_Helper_HeadScript::setAllowArbitraryAttributes()
Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_View_Helper_HeadScript
methodpublicsetAutoEscape(bool $autoEscape = true) : \Zend_View_Helper_Placeholder_Container_Standalone
inherited

Set whether or not auto escaping should be used

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::setAutoEscape()\Zend_View_Helper_HeadScript::setAutoEscape()
Parameters
Name Type Description
$autoEscape bool

whether or not to auto escape output

Returns
Type Description
\Zend_View_Helper_Placeholder_Container_Standalone
methodpublictoString(string | int $indent = null) : string
inherited

Retrieve string representation

Inherited from: \Zend_View_Helper_HeadScript::toString()
Parameters
Name Type Description
$indent string | int
Returns
Type Description
string
Documentation was generated by phpDocumentor 2.0.0a8.