/**
* Loads configuration from an array or a file.
*
* @param array|string $config A configuration array, or a JSON
* configuration file.
*/
public function load($config)
{
if (is_string($config) && file_exists($config)) {
$json = file_get_contents($config);
$config = Json::parse($json);
}
$this->configure($config);
}