Esempio n. 1
0
File: Row.php Progetto: krecek/nrsn
	public function offsetExists($key)
	{
		if (is_int($key)) {
			return (bool) array_slice((array) $this, $key, 1);
		}
		return parent::offsetExists($key);
	}
Esempio n. 2
0
	/**
	 * Returns the global configuration.
	 * @param  string key
	 * @param  mixed  default value
	 * @return mixed
	 */
	public static function getConfig($key = NULL, $default = NULL)
	{
		$params = NArrayHash::from(self::getContext()->parameters);
		if (func_num_args()) {
			return isset($params[$key]) ? $params[$key] : $default;
		} else {
			return $params;
		}
	}
Esempio n. 3
0
 public function getParams($vars)
 {
     if ($vars == NULL || count($vars) == 0) {
         return "";
     } else {
         $arr = array();
         foreach (NArrayHash::from($vars) as $key => $item) {
             if (is_numeric($key)) {
                 $arr[] = "\${$item}";
             } else {
                 $arr[] = "\${$key} = " . $this->parseValue($item);
             }
         }
         return implode(', ', $arr);
     }
 }