make the pdo fetch style configurable.

This commit is contained in:
Taylor Otwell
2012-02-24 11:35:02 -06:00
parent 9804bb55dc
commit 484a737382
3 changed files with 41 additions and 6 deletions

View File

@@ -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);
}
}