本文整理汇总了PHP中Dispatcher::_instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Dispatcher::_instance方法的具体用法?PHP Dispatcher::_instance怎么用?PHP Dispatcher::_instance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dispatcher
的用法示例。
在下文中一共展示了Dispatcher::_instance方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Instance
/**
* Ensure that we always have but one instance of this Controller
* @return Dispatcher object
*/
public static function Instance()
{
if (self::$_instance == null) {
self::$_instance = new Dispatcher();
}
return self::$_instance;
}
示例2: getInstance
public static function getInstance()
{
if (self::$_instance == null) {
self::$_instance = new DisPatcher();
return self::$_instance;
} else {
return self::$_instance;
}
}
示例3: getInstance
/**
* @static
* @return Dispatcher
*/
public static function getInstance($pPath = null)
{
if (self::$_instance == null) {
self::$_instance = new Dispatcher();
}
if ($pPath != null) {
self::$_instance->_path = $pPath;
}
return self::$_instance;
}
示例4: getInstance
public static function getInstance()
{
try {
if (defined('BENCHMARK_TIMER') && BENCHMARK_TIMER == 'on') {
self::startTimer();
}
if (!self::$_instance) {
self::$_instance = new self();
self::$_modelAndFlow = ModelAndFlow::getInstance();
}
if (!self::$_session) {
self::$_session = Session::getInstance();
}
} catch (Exception $ex) {
if (self::$_logger) {
self::$_logger->error('Can not get a instance of the dispatcher', $ex);
}
// also throw it to the container
throw new Exception($ex->getMessage());
}
return self::$_instance;
}
示例5: getInstance
public static function getInstance($initConfig = null)
{
if (!self::$_instance) {
self::$_instance = new Dispatcher($initConfig);
}
return self::$_instance;
}