Extends
lithium\core\Object
Adds config values to the public properties when a new object is created.
Parameters
- array $config Configuration options : default value - `scheme`: tcp - `host`: localhost - `port`: null - `username`: null - `password`: null - `path`: null - `body`: null
Source
public function __construct(array $config = array()) {
$defaults = array(
'scheme' => 'tcp',
'host' => 'localhost',
'port' => null,
'username' => null,
'password' => null,
'path' => null,
'body' => null
);
$config += $defaults;
foreach (array_filter($config) as $key => $value) {
$this->{$key} = $value;
}
parent::__construct($config);
}