1234567891011121314151617181920212223 |
- <?php namespace System;
- class Arr {
- /**
- * Get an item from an array.
- *
- * @param string $key
- * @param string $default
- * @param array $array
- * @return mixed
- */
- public static function get($key, $default = null, $array = array())
- {
- if (is_null($key))
- {
- return $array;
- }
- return (array_key_exists($key, $array)) ? $array[$key] : $default;
- }
- }
|