View/Helper/HeadStyle.php
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 license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_View
- Subpackage
- Helper
- Version
- $Id$
\Zend_View_Helper_HeadStyle
Package: Zend_View\Helper
Throws
Returns
Helper for setting and retrieving stylesheets
- Parent(s)
- \Zend_View_Helper_Placeholder_Container_Standalone < \Zend_View_Helper_Abstract
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Uses
Properties
string $_captureAttrs = null
Capture type and/or attributes (used for hinting during capture)
Default value
null
Details- Type
- string
array $_mediaTypes = array('all', 'aural', 'braille', 'handheld', 'print', 'projection', 'screen', 'tty', 'tv')
Allowed media types
Default value
array('all', 'aural', 'braille', 'handheld', 'print', 'projection', 'screen', 'tty', 'tv')
Details- Type
- array
array $_optionalAttributes = array('lang', 'title', 'media', 'dir')
Allowed optional attributes
Default value
array('lang', 'title', 'media', 'dir')
Details- Type
- array
Methods
__call(string $method, array $args) : void
Overload method calls
Allows the following method calls:
- appendStyle($content, $attributes = array())
- offsetSetStyle($index, $content, $attributes = array())
- prependStyle($content, $attributes = array())
- setStyle($content, $attributes = array())
ParametersName | Type | Description |
---|---|---|
$method | string | |
$args | array |
Exception | Description |
---|---|
\Zend_View_Exception | When no $content provided or invalid method |
_isValid(mixed $value) : boolean
Determine if a value is a valid style tag
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | mixed |
Type | Description |
---|---|
boolean |
append(mixed $value) : void
Override append to enforce style creation
Parameters
Name | Type | Description |
---|---|---|
$value | mixed |
captureStart( $type = \Zend_View_Helper_Placeholder_Container_Abstract::APPEND, $attrs = null) : void
Start capture action
Parameters
Name | Type | Description |
---|---|---|
$type | ||
$attrs |
createData(string $content, array $attributes) : \stdClass
Create data item for use in stack
Parameters
Returns
Name | Type | Description |
---|---|---|
$content | string | |
$attributes | array |
Type | Description |
---|---|
\stdClass |
headStyle(string $content = null, string $placement = 'APPEND', string | array $attributes = array()) : \Zend_View_Helper_HeadStyle
Return headStyle object
Returns headStyle helper object; optionally, allows specifying
ParametersName | Type | Description |
---|---|---|
$content | string | Stylesheet contents |
$placement | string | Append, prepend, or set |
$attributes | string | array | Optional attributes to utilize |
Type | Description |
---|---|
\Zend_View_Helper_HeadStyle |
itemToString(\stdClass $item, string $indent) : string
Convert content and attributes into valid style tag
Parameters
Returns
Name | Type | Description |
---|---|---|
$item | \stdClass | Item to render |
$indent | string | Indentation to use |
Type | Description |
---|---|
string |
offsetSet(string | int $index, mixed $value) : void
Override offsetSet to enforce style creation
Parameters
Name | Type | Description |
---|---|---|
$index | string | int | |
$value | mixed |
prepend(mixed $value) : void
Override prepend to enforce style creation
Parameters
Name | Type | Description |
---|---|---|
$value | mixed |
set(mixed $value) : void
Override set to enforce style creation
Parameters
Name | Type | Description |
---|---|---|
$value | mixed |