config($config); } /** * Sets instance config. When $config is null, returns config array * * Config * * - `types` string or array, levels the engine is interested in * - `scopes` string or array, scopes the engine is interested in * * @param array $config engine configuration * @return array */ public function config($config = array()) { if (!empty($config)) { foreach (array('types', 'scopes') as $option) { if (isset($config[$option]) && is_string($config[$option])) { $config[$option] = array($config[$option]); } } $this->_config = $config; } return $this->_config; } }