Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
InlineScript Class Reference

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

Public Member Functions

 __invoke ($mode=self::FILE, $spec=null, $placement= 'APPEND', array $attrs=[], $type= 'text/javascript')
 Return InlineScript object.
 
- Public Member Functions inherited from HeadScript
 __construct ()
 Constructor.
 
 __invoke ($mode=self::FILE, $spec=null, $placement= 'APPEND', array $attrs=[], $type= 'text/javascript')
 Return headScript object.
 
 __call ($method, $args)
 Overload method access.
 
 toString ($indent=null)
 Retrieve string representation.
 
 captureStart ($captureType=Placeholder\Container\AbstractContainer::APPEND, $type= 'text/javascript', $attrs=[])
 Start capture action.
 
 captureEnd ()
 End capture action and store.
 
 createData ($type, array $attributes, $content=null)
 Create data item containing all necessary components of script.
 
 itemToString ($item, $indent, $escapeStart, $escapeEnd)
 Create script HTML.
 
 append ($value)
 Override append.
 
 prepend ($value)
 Override prepend.
 
 set ($value)
 Override set.
 
 offsetSet ($index, $value)
 Override offsetSet.
 
 setAllowArbitraryAttributes ($flag)
 Set flag indicating if arbitrary attributes are allowed.
 
 arbitraryAttributesAllowed ()
 Are arbitrary attributes allowed?
 
- Public Member Functions inherited from AbstractStandalone
 __construct ()
 Constructor.
 
 __call ($method, $args)
 Overload.
 
 __set ($key, $value)
 Overloading: set property value.
 
 __get ($key)
 Overloading: retrieve property.
 
 __isset ($key)
 Overloading: check if property is set.
 
 __unset ($key)
 Overloading: unset property.
 
 __toString ()
 Cast to string representation.
 
 toString ()
 String representation.
 
 setAutoEscape ($autoEscape=true)
 Set whether or not auto escaping should be used.
 
 getAutoEscape ()
 Return whether autoEscaping is enabled or disabled.
 
 setContainer (AbstractContainer $container)
 Set container on which to operate.
 
 getContainer ()
 Retrieve placeholder container.
 
 deleteContainer ()
 Delete a container.
 
 setContainerClass ($name)
 Set the container class to use.
 
 getContainerClass ()
 Retrieve the container class.
 
 setEscaper (Escaper $escaper)
 Set Escaper instance.
 
 getEscaper ($enc= 'UTF-8')
 Get Escaper instance.
 
 count ()
 Countable.
 
 offsetExists ($offset)
 ArrayAccess: offsetExists.
 
 offsetGet ($offset)
 ArrayAccess: offsetGet.
 
 offsetSet ($offset, $value)
 ArrayAccess: offsetSet.
 
 offsetUnset ($offset)
 ArrayAccess: offsetUnset.
 
 getIterator ()
 IteratorAggregate: get Iterator.
 
- Public Member Functions inherited from AbstractHelper
 setView (Renderer $view)
 Set the View object.
 
 getView ()
 Get the view object.
 

Protected Attributes

 $regKey = 'Zend_View_Helper_InlineScript'
 
- Protected Attributes inherited from HeadScript
 $regKey = 'Zend_View_Helper_HeadScript'
 
 $arbitraryAttributes = false
 
 $captureLock
 
 $captureScriptType
 
 $captureScriptAttrs = null
 
 $captureType
 
 $optionalAttributes
 
 $requiredAttributes = ['type']
 
- Protected Attributes inherited from AbstractStandalone
 $autoEscape = true
 
 $container
 
 $containerClass = 'Zend\View\Helper\Placeholder\Container'
 
 $escapers = []
 
- Protected Attributes inherited from AbstractHelper
 $view = null
 

Additional Inherited Members

- Public Attributes inherited from HeadScript
const FILE = 'FILE'
 Script type constants.
 
const SCRIPT = 'SCRIPT'
 
 $useCdata = false
 
- Protected Member Functions inherited from HeadScript
 isDuplicate ($file)
 Is the file specified a duplicate?
 
 isValid ($value)
 Is the script provided valid?
 

Detailed Description

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

Member Function Documentation

__invoke (   $mode = self::FILE,
  $spec = null,
  $placement = 'APPEND',
array  $attrs = [],
  $type = 'text/javascript' 
)

Return InlineScript object.

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

Parameters
string$modeScript or file
string$specScript/url
string$placementAppend, prepend, or set
array$attrsArray of script attributes
string$typeScript type and/or array of script attributes
Returns
InlineScript

Member Data Documentation

$regKey = 'Zend_View_Helper_InlineScript'
protected