View/Helper/HeadStyle.php

Show: PublicProtectedPrivateinherited
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 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: HeadStyle.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_View_Helper_HeadStyle

Package: Zend\View\Helper
Helper for setting and retrieving stylesheets
Parent(s)
\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_Placeholder_Container_Standalone  

Properties

>VPropertyprotected\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
Default valuetrueDetails
Type
\book
Inherited_from
\Zend_View_Helper_Placeholder_Container_Standalone::$$_autoEscape  
>VPropertyprotectedstring $_captureAttrs = null
Capture type and/or attributes (used for hinting during capture)
Default valuenullDetails
Type
string
>VPropertyprotectedbool $_captureLock
Capture lock
Details
Type
bool
>VPropertyprotectedstring $_captureType
Capture type (append, prepend, set)
Details
Type
string
>VPropertyprotectedarray $_mediaTypes = array('all', 'aural', 'braille', 'handheld', 'print', 'projection', 'screen', 'tty', 'tv')
Allowed media types
Default valuearray('all', 'aural', 'braille', 'handheld', 'print', 'projection', 'screen', 'tty', 'tv')Details
Type
array
>VPropertyprotectedarray $_optionalAttributes = array('lang', 'title', 'media', 'dir')
Allowed optional attributes
Default valuearray('lang', 'title', 'media', 'dir')Details
Type
array
>VPropertyprotectedstring $_regKey = 'Zend_View_Helper_HeadStyle'
Registry key for placeholder
Default value'Zend_View_Helper_HeadStyle'Details
Type
string

Methods

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

Parameters
NameTypeDescription
$methodstring
$argsarray
Throws
ExceptionDescription
\Zend_View_ExceptionWhen no $content provided or invalid method
methodpublic__construct() : void

Constructor

Set separator to PHP_EOL.

methodpublic__get(string $key) : mixed
inherited

Overloading: retrieve property

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__get()
Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
mixed
methodpublic__isset(string $key) : bool
inherited

Overloading: check if property is set

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__isset()
Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
bool
methodpublic__set(string $key, mixed $value) : void
inherited

Overloading: set property value

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__set()
Parameters
NameTypeDescription
$keystring
$valuemixed
methodpublic__toString() : string
inherited

Cast to string representation

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__toString()
Returns
TypeDescription
string
methodpublic__unset(string $key) : void
inherited

Overloading: unset property

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__unset()
Parameters
NameTypeDescription
$keystring
methodprotected_escape(string $string) : string
Parameters
NameTypeDescription
$stringstring
Returns
TypeDescription
string
methodprotected_isValid(mixed $value) : boolean

Determine if a value is a valid style tag

Parameters
NameTypeDescription
$valuemixed
Returns
TypeDescription
boolean
methodpublicappend(mixed $value) : void

Override append to enforce style creation

Parameters
NameTypeDescription
$valuemixed
methodpubliccaptureEnd() : void

End capture action and store

methodpubliccaptureStart( $type = \Zend_View_Helper_Placeholder_Container_Abstract::APPEND,  $attrs = null) : void

Start capture action

Parameters
NameTypeDescription
$type
$attrs
methodpubliccount() : int
Returns
TypeDescription
int
methodpubliccreateData(string $content, array $attributes) : \stdClass

Create data item for use in stack

Parameters
NameTypeDescription
$contentstring
$attributesarray
Returns
TypeDescription
\stdClass
methodpublicdirect() : void
methodpublicgetAutoEscape() : void
inherited

Return whether autoEscaping is enabled or disabled

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getAutoEscape()

return bool

methodpublicgetIterator() : \Iterator
inherited

IteratorAggregate: get Iterator

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getIterator()
Returns
TypeDescription
\Iterator
methodpublicheadStyle(string $content = null, string $placement = 'APPEND', string | array $attributes = array()) : \Zend_View_Helper_HeadStyle

Return headStyle object

Returns headStyle helper object; optionally, allows specifying

Parameters
NameTypeDescription
$contentstring

Stylesheet contents

$placementstring

Append, prepend, or set

$attributesstring | array

Optional attributes to utilize

Returns
TypeDescription
\Zend_View_Helper_HeadStyle
methodpublicitemToString(\stdClass $item, string $indent) : string

Convert content and attributes into valid style tag

Parameters
NameTypeDescription
$item\stdClass

Item to render

$indentstring

Indentation to use

Returns
TypeDescription
string
methodpublicoffsetExists(string | int $offset) : bool
inherited

ArrayAccess: offsetExists

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::offsetExists()
Parameters
NameTypeDescription
$offsetstring | int
Returns
TypeDescription
bool
methodpublicoffsetGet(string | int $offset) : mixed
inherited

ArrayAccess: offsetGet

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::offsetGet()
Parameters
NameTypeDescription
$offsetstring | int
Returns
TypeDescription
mixed
methodpublicoffsetSet(string | int $index, mixed $value) : void

Override offsetSet to enforce style creation

Parameters
NameTypeDescription
$indexstring | int
$valuemixed
methodpublicoffsetUnset(string | int $offset) : void
inherited

ArrayAccess: offsetUnset

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::offsetUnset()
Parameters
NameTypeDescription
$offsetstring | int
methodpublicprepend(mixed $value) : void

Override prepend to enforce style creation

Parameters
NameTypeDescription
$valuemixed
methodpublicset(mixed $value) : void

Override set to enforce style creation

Parameters
NameTypeDescription
$valuemixed
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()
Parameters
NameTypeDescription
$autoEscapebool

whether or not to auto escape output

Returns
TypeDescription
\Zend_View_Helper_Placeholder_Container_Standalone
methodpublictoString(string | int $indent = null) : string

Create string representation of placeholder

Parameters
NameTypeDescription
$indentstring | int
Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.0.0a12.