<?php
//** 功能提供 */
namespace app\api\service;

//use Token;
class Provider
{
    static $storage = [];

    const NAME_SPACE = 'app\api\service\\';

    /**
     * 获取容器对象
     * @param $provider
     * @return mixed
     */
    public static function Container($provider){
        if(!isset(self::$storage[$provider])){
            $class_name = self::NAME_SPACE.ucfirst(strtolower($provider));
            $instance =  new $class_name;
            self::$storage[$provider] = $instance;
        }
        return self::$storage[$provider];
    }
}