-
Notifications
You must be signed in to change notification settings - Fork 39
Trait Options
Anton edited this page Oct 1, 2018
·
2 revisions
Обеспечение единого интерфейса для инициализации и настройки пакетов фреймворка.
Описываем метод-сетер для искомого свойства:
namespace Application;
class My {
use Options;
protected $foo;
public setFoo($value) {
$this->foo = $value;
}
}
$my = new My();
$my->setOptions(['foo' => 'bar']);
$my->getOptions(); // ['foo' => 'bar']
$my->setOption('foo', 'bar');
$my->getOption('foo'); // 'bar'
Acl
Application
Auth
Cache
Common
— Exception
— Collection
— Container
— Helper
— Options
— Singleton
Config
Controller
— Data
— Mapper
—— Crud
—— Rest
— Reflection
Crud
— Crud Table
Db
— Row
— Table
— Relations
— Query
Debug
EventManager
Grid
Http
Layout
Logger
Mailer
Messages
Nil
Proxy
Registry
Request
Response
Router
Session
Translator
Validator
View