选择语言 :

 Core_Core::factory

根据$objName返回一个实例化并静态存储的对象

null Core_Core::factory( string $obj_name [, string $key = empty ] )

参数列表

参数 类型 描述 默认值
$obj_name string $obj_name
$key string $key empty
File: ./core/classes/core.class.php
public static function factory($obj_name, $key = '')
{
    if (!isset(Core::$instances[$obj_name][$key]))
    {
        Core::$instances[$obj_name][$key] = new $obj_name($key);
    }

    return Core::$instances[$obj_name][$key];
}