API Documentation

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_View  
subpackage
Helper  
version
$Id: HeadStyle.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_View_Helper_HeadStyle

Helper for setting and retrieving stylesheets

Extends from
\Zend_View_Helper_Placeholder_Container_Standalone
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_View  
subpackage
Helper  
uses
\Zend_View_Helper_Placeholder_Container_Standalone  

Properties

Propertyprotectedstring  $_captureAttrs= 'null'

Capture type and/or attributes (used for hinting during capture)

Default valuenullDetails
Type
string
Propertyprotectedbool  $_captureLock= ''

Capture lock

Details
Type
bool
Propertyprotectedstring  $_captureType= ''

Capture type (append, prepend, set)

Details
Type
string
Propertyprotectedarray  $_mediaTypes= 'array'

Allowed media types

Default valuearrayDetails
Type
array
Propertyprotectedarray  $_optionalAttributes= 'array'

Allowed optional attributes

Default valuearrayDetails
Type
array
Propertyprotectedstring  $_regKey= 'Zend_View_Helper_HeadStyle'

Registry key for placeholder

Default valueZend_View_Helper_HeadStyleDetails
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
Name Type Description
$method string
$args array
Throws
Exception Description
\Zend_View_Exception When no $content provided or invalid method
methodpublic__construct( ) : void

Constructor

Set separator to PHP_EOL.

methodpublic__get( string $key ) : mixed

Overloading: retrieve property

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__get()
Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublic__isset( string $key ) : bool

Overloading: check if property is set

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__isset()
Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublic__set( string $key, mixed $value ) : void

Overloading: set property value

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__set()
Parameters
Name Type Description
$key string
$value mixed
methodpublic__toString( ) : string

Cast to string representation

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__toString()
Returns
Type Description
string
methodpublic__unset( string $key ) : void

Overloading: unset property

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::__unset()
Parameters
Name Type Description
$key string
methodprotected_escape( string $string ) : string
Parameters
Name Type Description
$string string
Returns
Type Description
string
methodprotected_isValid( mixed $value ) : boolean

Determine if a value is a valid style tag

Parameters
Name Type Description
$value mixed
Returns
Type Description
boolean
methodpublicappend( mixed $value ) : void

Override append to enforce style creation

Parameters
Name Type Description
$value mixed
methodpubliccaptureEnd( ) : void

End capture action and store

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

Start capture action

Parameters
Name Type Description
$type
$attrs
methodpubliccount( ) : int
Returns
Type Description
int
methodpubliccreateData( string $content, array $attributes ) : \stdClass

Create data item for use in stack

Parameters
Name Type Description
$content string
$attributes array
Returns
Type Description
\stdClass
methodpublicdirect( ) : void

Strategy pattern: currently unutilized

Inherited from: \Zend_View_Helper_Abstract::direct()
methodpublicgetAutoEscape( ) : void

Return whether autoEscaping is enabled or disabled

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getAutoEscape()

return bool

methodpublicgetIterator( ) : \Iterator

IteratorAggregate: get Iterator

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::getIterator()
Returns
Type Description
\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
Name Type Description
$content string Stylesheet contents
$placement string Append, prepend, or set
$attributes string|array Optional attributes to utilize
Returns
Type Description
\Zend_View_Helper_HeadStyle
methodpublicitemToString( \stdClass $item, string $indent ) : string

Convert content and attributes into valid style tag

Parameters
Name Type Description
$item \stdClass Item to render
$indent string Indentation to use
Returns
Type Description
string
methodpublicoffsetExists( string|int $offset ) : bool

ArrayAccess: offsetExists

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::offsetExists()
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

Override offsetSet to enforce style creation

Parameters
Name Type Description
$index string|int
$value mixed
methodpublicoffsetUnset( string|int $offset ) : void
Parameters
Name Type Description
$offset string|int
methodpublicprepend( mixed $value ) : void

Override prepend to enforce style creation

Parameters
Name Type Description
$value mixed
methodpublicset( mixed $value ) : void

Override set to enforce style creation

Parameters
Name Type Description
$value mixed
methodpublicsetAutoEscape( bool $autoEscape = true ) : \Zend_View_Helper_Placeholder_Container_Standalone

Set whether or not auto escaping should be used

Inherited from: \Zend_View_Helper_Placeholder_Container_Standalone::setAutoEscape()
Parameters
Name Type Description
$autoEscape bool whether or not to auto escape output
Returns
Type Description
\Zend_View_Helper_Placeholder_Container_Standalone
methodpublicsetView( \Zend_View_Interface $view ) : \Zend_View_Helper_Abstract

Set the View object

Inherited from: \Zend_View_Helper_Abstract::setView()
Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
\Zend_View_Helper_Abstract
methodpublictoString( string|int $indent = null ) : string

Create string representation of placeholder

Parameters
Name Type Description
$indent string|int
Returns
Type Description
string
Documentation was generated by DocBlox 0.13.3.