View/Helper/Placeholder/Container/Abstract.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 [email protected] 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_Placeholder_Container_Abstract

Package: Zend_View\Helper
Abstract class representing container for placeholder values
Parent(s)
\ArrayObject
Children
\Zend_View_Helper_Placeholder_Container
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  SET = 'SET'
Whether or not to override all contents of placeholder
Const
string  
>VConstant  APPEND = 'APPEND'
Whether or not to append contents to placeholder
Const
string  
>VConstant  PREPEND = 'PREPEND'
Whether or not to prepend contents to placeholder
Const
string  

Properties

>VPropertyprotectedstring $_captureKey
Key to which to capture content
Details
Type
string
>VPropertyprotectedbool $_captureLock = false
Whether or not we're already capturing for this given container
Default valuefalseDetails
Type
bool
>VPropertyprotectedstring $_captureType
What type of capture (overwrite (set), append, prepend) to use
Details
Type
string
>VPropertyprotectedstring $_indent = ''
What string to use as the indentation of output, this will typically be spaces. Eg: ' '
Default value''Details
Type
string
>VPropertyprotectedstring $_postfix = ''
What text to append the placeholder with when rendering
Default value''Details
Type
string
>VPropertyprotectedstring $_prefix = ''
What text to prefix the placeholder with when rendering
Default value''Details
Type
string
>VPropertyprotectedstring $_separator = ''
What string to use between individual items in the placeholder when rendering
Default value''Details
Type
string

Methods

methodpublic__construct() : \Zend_View_Helper_Placeholder_Container_Abstract

Constructor - This is needed so that we can attach a class member as the ArrayObject container

methodpublic__toString() : string

Serialize object to string

Returns
TypeDescription
string
methodpubliccaptureEnd() : void

End content capture

methodpubliccaptureStart(int | string $type = \Zend_View_Helper_Placeholder_Container_Abstract::APPEND, null $key = null) : void

Start capturing content to push into placeholder

Parameters
NameTypeDescription
$typeint | string

How to capture content into placeholder; append, prepend, or set

$keynull
Throws
ExceptionDescription
\Zend_View_Helper_Placeholder_Container_Exception
methodpublicgetIndent() : string

Retrieve indentation

Returns
TypeDescription
string
methodpublicgetKeys() : array

Get keys

Returns
TypeDescription
array
methodpublicgetPostfix() : string

Retrieve postfix

Returns
TypeDescription
string
methodpublicgetPrefix() : string

Retrieve prefix

Returns
TypeDescription
string
methodpublicgetSeparator() : string

Retrieve separator

Returns
TypeDescription
string
methodpublicgetValue() : mixed

Retrieve container value

If single element registered, returns that element; otherwise, serializes to array.
Returns
TypeDescription
mixed
methodpublicgetWhitespace(int | string $indent) : string

Retrieve whitespace representation of $indent

Parameters
NameTypeDescription
$indentint | string
Returns
TypeDescription
string
methodpublicnextIndex() : int

Next Index

as defined by the PHP manual
Returns
TypeDescription
int
methodpublicprepend(mixed $value) : void

Prepend a value to the top of the container

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

Set a single value

Parameters
NameTypeDescription
$valuemixed
methodpublicsetIndent(string | int $indent) : \Zend_View_Helper_Placeholder_Container_Abstract

Set the indentation string for __toString() serialization, optionally, if a number is passed, it will be the number of spaces

Parameters
NameTypeDescription
$indentstring | int
Returns
TypeDescription
\Zend_View_Helper_Placeholder_Container_Abstract
methodpublicsetPostfix(string $postfix) : \Zend_View_Helper_Placeholder_Container

Set postfix for __toString() serialization

Parameters
NameTypeDescription
$postfixstring
Returns
TypeDescription
\Zend_View_Helper_Placeholder_Container
methodpublicsetPrefix(string $prefix) : \Zend_View_Helper_Placeholder_Container

Set prefix for __toString() serialization

Parameters
NameTypeDescription
$prefixstring
Returns
TypeDescription
\Zend_View_Helper_Placeholder_Container
methodpublicsetSeparator(string $separator) : \Zend_View_Helper_Placeholder_Container

Set separator for __toString() serialization

Used to implode elements in container
Parameters
NameTypeDescription
$separatorstring
Returns
TypeDescription
\Zend_View_Helper_Placeholder_Container
methodpublictoString(null $indent = null) : string

Render the placeholder

Parameters
NameTypeDescription
$indentnull
Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.2.0 .