class BaseService
{
private static $_instance;
public function __construct()
{
}
/**
* 实例化service
* @author wzs
* @return static
*/
final public static function service()
{
$class = get_called_class();
if (!isset(self::$_instance[$class]) || !(self::$_instance[$class] instanceof BaseService)) {
self::$_instance[$class] = new static();
}
return self::$_instance[$class];
}
}