public function __construct(array $config = array()) { foreach ($config as $key => $value) { $this->{$key} = $value; } $this->init(); }