<?php
class container
{
    protected static $objects;  //用于存放实例
    static public function get($key)
    {
        if (!isset(self::$objects[$key]))
        {
            self::$objects[$key] = new $key;
        }
        return self::$objects[$key];
    }
    
}

