public function offsetExists($key) { if (is_int($key)) { $arr = array_values((array) $this); return isset($arr[$key]); } return parent::offsetExists($key); }
/** * Returns the global configuration. * @param string key * @param mixed default value * @return mixed */ public static function getConfig($key = NULL, $default = NULL) { $params = ArrayHash::from(self::getContext()->parameters); if (func_num_args()) { return isset($params[$key]) ? $params[$key] : $default; } else { return $params; } }