class Placeholder extends AbstractHelper (View source)

Helper for passing data between otherwise segregated Views. It's called Placeholder to make its typical usage obvious, but can be used just as easily for non-Placeholder things. That said, the support for this is only guaranteed to effect subsequently rendered templates, and of course Layouts.

Properties

protected ContainerService $containerService
protected Container $_container from AbstractHelper
protected string $_regKey Registry key under which container registers itself
protected bool $_autoEscape Flag whether to automatically escape output, must also be enforced in the child class if __toString/toString is overwritten from AbstractHelper
protected Container[] $containers

Methods

__construct(ContainerService $containerService)

AbstractHelper constructor.

setAutoEscape(bool $autoEscape = true)

Set whether or not auto escaping should be used

getAutoEscape()

Return whether autoEscaping is enabled or disabled

string
_escape(string $string)

Escape a string

setContainer(Container $container)

Set container on which to operate

getContainer()

Retrieve placeholder container

void
__set(string $key, mixed $value)

Overloading: set property value

mixed
__get(string $key)

Overloading: retrieve property

bool
__isset(string $key)

Overloading: check if property is set

void
__unset(string $key)

Overloading: unset property

mixed
__call(string $method, array $args)

Overload

string
toString()

String representation

string
__toString()

Cast to string representation

int
count()

Countable

bool
offsetExists(string|int $offset)

ArrayAccess: offsetExists

mixed
offsetGet(string|int $offset)

ArrayAccess: offsetGet

void
offsetSet(string|int $offset, mixed $value)

ArrayAccess: offsetSet

void
offsetUnset(string|int $offset)

ArrayAccess: offsetUnset

getIterator()

IteratorAggregate: get Iterator

void
set(mixed $value)

No description

void
prepend(mixed $value)

No description

void
append(mixed $value)

No description

Container
setPrefix(string $prefix)

No description

string
getPrefix()

No description

Container
setPostfix(string $postfix)

No description

string
getPostfix()

No description

Container
setSeparator(string $separator)

No description

string
getSeparator()

No description

Container
setIndent(string|int $intent)

No description

string|int
getIndent()

No description

string
getWhitespace(string|int $indent)

No description

void
captureStart($type = Container::APPEND, $key = null)

No description

void
captureEnd()

No description

getName()

No description

__invoke($containerName = null)

Retrieve object instance; optionally add meta tag

Details

__construct(ContainerService $containerService)

AbstractHelper constructor.

Parameters

ContainerService $containerService

AbstractHelper setAutoEscape(bool $autoEscape = true)

Set whether or not auto escaping should be used

Parameters

bool $autoEscape whether or not to auto escape output

Return Value

AbstractHelper

getAutoEscape()

Return whether autoEscaping is enabled or disabled

return bool

protected string _escape(string $string)

Escape a string

Parameters

string $string

Return Value

string

AbstractHelper setContainer(Container $container)

Set container on which to operate

Parameters

Container $container

Return Value

AbstractHelper

Container getContainer()

Retrieve placeholder container

Return Value

Container

void __set(string $key, mixed $value)

Overloading: set property value

Parameters

string $key
mixed $value

Return Value

void

mixed __get(string $key)

Overloading: retrieve property

Parameters

string $key

Return Value

mixed

bool __isset(string $key)

Overloading: check if property is set

Parameters

string $key

Return Value

bool

void __unset(string $key)

Overloading: unset property

Parameters

string $key

Return Value

void

mixed __call(string $method, array $args)

Overload

Proxy to container methods

Parameters

string $method
array $args

Return Value

mixed

string toString()

String representation

Return Value

string

string __toString()

Cast to string representation

Return Value

string

int count()

Countable

Return Value

int

bool offsetExists(string|int $offset)

ArrayAccess: offsetExists

Parameters

string|int $offset

Return Value

bool

mixed offsetGet(string|int $offset)

ArrayAccess: offsetGet

Parameters

string|int $offset

Return Value

mixed

void offsetSet(string|int $offset, mixed $value)

ArrayAccess: offsetSet

Parameters

string|int $offset
mixed $value

Return Value

void

void offsetUnset(string|int $offset)

ArrayAccess: offsetUnset

Parameters

string|int $offset

Return Value

void

Iterator getIterator()

IteratorAggregate: get Iterator

Return Value

Iterator

void set(mixed $value)

Parameters

mixed $value

Return Value

void

void prepend(mixed $value)

Parameters

mixed $value

Return Value

void

void append(mixed $value)

Parameters

mixed $value

Return Value

void

Container setPrefix(string $prefix)

Parameters

string $prefix

Return Value

Container

string getPrefix()

Return Value

string

Container setPostfix(string $postfix)

Parameters

string $postfix

Return Value

Container

string getPostfix()

Return Value

string

Container setSeparator(string $separator)

Parameters

string $separator

Return Value

Container

string getSeparator()

Return Value

string

Container setIndent(string|int $intent)

Parameters

string|int $intent

Return Value

Container

string|int getIndent()

Return Value

string|int

string getWhitespace(string|int $indent)

Parameters

string|int $indent

Return Value

string

void captureStart($type = Container::APPEND, $key = null)

Parameters

$type
$key

Return Value

void

void captureEnd()

Return Value

void

getName()

Container __invoke($containerName = null)

Retrieve object instance; optionally add meta tag

Parameters

$containerName

Return Value

Container