<?php

namespace Buckhill;

if(!function_exists('config'))
{
    function config($key = null, $default = null)
    {
        if(is_null($key))
        {
            return Configuration::getInstance();
        }

        if(is_array($key))
        {
            return Configuration::getInstance()->setFromKey($key);
        }

        return Configuration::getInstance()->get($key, $default);
    }
}