Base class in Lithium's hierarchy, from which all concrete classes inherit. This class defines several conventions for how classes in Lithium should be structured:
- **Universal constructor**: Any class which defines a `__construct()` method should take exactly one parameter (`$config`), and that parameter should always be an array. Any settings passed to the constructor will be stored in the `$_config` property of the object. - **Initialization / automatic configuration**: After the constructor, the `_init()` method is called. This method can be used to initialize the object, keeping complex logic and high-overhead or difficult to test operations out of the constructor. This method is called automatically by `Object::__construct()`, but may be disabled by passing `'init' => false` to the constructor. The initializer is also used for automatically assigning object properties. See the documentation on the `_init()` method for more details. - **Filters**: The `Object` class implements two methods which allow an object to easily implement filterable methods. The `_filter()` method allows methods to be implemented as filterable, and the `applyFilter()` method allows filters to be wrapped around them. - **Testing / misc.**: The `__set_state()` method provides a default implementation of the PHP magic method (works with `var_export()`) which can instantiate an object with a static method call. Finally, the `_stop()` method may be used instead of `exit()`, as it can be overridden for testing purposes.
Subclasses
- lithium\action\Controller
- lithium\analysis\Debugger
- lithium\analysis\logger\adapter\Cache
- lithium\analysis\logger\adapter\File
- lithium\analysis\logger\adapter\FirePhp
- lithium\analysis\logger\adapter\Growl
- lithium\analysis\logger\adapter\Syslog
- lithium\console\Command
- lithium\console\Request
- lithium\console\Response
- lithium\console\Router
- lithium\data\Entity
- lithium\data\Source
- lithium\data\model\Query
- lithium\data\model\Relationship
- lithium\data\source\database\Result
- lithium\data\source\database\adapter\my_sql\Result
- lithium\data\source\mongo_db\Result
- lithium\g11n\catalog\Adapter
- lithium\net\Message
- lithium\net\Socket
- lithium\net\http\Route
- lithium\net\http\Service
- lithium\security\auth\adapter\Form
- lithium\security\auth\adapter\Http
- lithium\storage\cache\adapter\Apc
- lithium\storage\cache\adapter\File
- lithium\storage\cache\adapter\Memcache
- lithium\storage\cache\adapter\Memory
- lithium\storage\cache\adapter\Redis
- lithium\storage\cache\adapter\XCache
- lithium\storage\cache\strategy\Base64
- lithium\storage\cache\strategy\Json
- lithium\storage\cache\strategy\Serializer
- lithium\storage\session\adapter\Cookie
- lithium\storage\session\adapter\Memory
- lithium\storage\session\adapter\Php
- lithium\storage\session\strategy\Encrypt
- lithium\storage\session\strategy\Hmac
- lithium\template\Helper
- lithium\template\View
- lithium\template\view\Renderer
- lithium\test\Controller
- lithium\test\Report
- lithium\test\Unit
- lithium\util\Collection