make the pdo fetch style configurable.
This commit is contained in:
@@ -56,13 +56,14 @@ class Config {
|
||||
* </code>
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $default
|
||||
* @return array
|
||||
*/
|
||||
public static function get($key)
|
||||
public static function get($key, $default = null)
|
||||
{
|
||||
list($bundle, $file, $item) = static::parse($key);
|
||||
|
||||
if ( ! static::load($bundle, $file)) return;
|
||||
if ( ! static::load($bundle, $file)) return value($default);
|
||||
|
||||
$items = static::$items[$bundle][$file];
|
||||
|
||||
@@ -75,7 +76,7 @@ class Config {
|
||||
}
|
||||
else
|
||||
{
|
||||
return array_get($items, $item);
|
||||
return array_get($items, $item, $default);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user