public function __construct($config = null) { if (is_string($config)) { $this->config = new ConfigRepository($config); } else { $this->config = $config ?: new ConfigRepository(); } }