Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/vendors/Netcarver/Textile/DataBag.php - 100 lines - 2933 bytes - Source - Print

Description: Textile - A Humane Web Text Generator.

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

DataBag:: (2 methods):
__construct()
__call()

Class: DataBag

Simple data storage.

This class to allows storing assignments in an internal
data array.

<code>
use Netcarver\Textile\DataBag;
$plant = new DataBag(array('key' => 'value'));
$plant->flower('rose')->color('red');
</code>
__construct(array $data = null)  line: 64
Constructor.

param: array|null $data The initial data array stored in the bag
__call($name, array $params line: 75
Adds a value to the bag.

Empty values are rejected, unless the
second argument is set TRUE.

<code>
use Netcarver\Textile\DataBag;
$plant = new DataBag(array('key' => 'value'));
$plant->flower('rose')->color('red')->emptyValue(false, true);
</code>

return: DataBag
param: string $name   The name
param: array  $params Arguments

title

Body