The Yaf_Config_Simple class

(Yaf >=1.0.0)

Introduction

Yaf_Config_Simple is a configuration adapter backed by a PHP array (or, optionally, an INI file). In contrast to Yaf_Config_Ini it is mutable by default: values can be changed at runtime, which makes it suitable both for programmatically built configuration and for configuration that needs to be adjusted during the request.

Class synopsis

class Yaf_Config_Simple extends Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable {
/* Properties */
protected $_readonly;
/* Methods */
publicfunction __construct(array $values, bool $readonly = false)
public function count(): int
public function current(): mixed
public function get(string $name = NULL): mixed
public function __isset(string $name): bool
public function key(): mixed
public function next(): void
public function offsetExists(mixed $name): bool
public function offsetGet(mixed $name): mixed
public function offsetSet(mixed $name, mixed $value): void
public function offsetUnset(mixed $name): void
public function readonly(): bool
public function rewind(): void
public function set(string $name, mixed $value): bool
public function toArray(): array
public function valid(): bool
/* Inherited methods */
public function Yaf_Config_Abstract::get(string $name = NULL): mixed
abstract public function Yaf_Config_Abstract::readonly(): bool
abstract public function Yaf_Config_Abstract::set(string $name, mixed $value): bool
}

Properties

_config

_readonly

Table of Contents

add a note

User Contributed Notes 1 note

up
0
msn_and_i at hotmail dot com
11 years ago
The Yaf_Config_Simple construct method parameters may be wrong documenting,  actually first parameter shoud be array and second is string indicating if readonly.