public function __construct($config) { if (is_array($config)) { $config = new Configuration($config); } $this->config = $config; }