当前位置: 首页>>代码示例>>PHP>>正文


PHP VmConfig::_debug方法代码示例

本文整理汇总了PHP中VmConfig::_debug方法的典型用法代码示例。如果您正苦于以下问题:PHP VmConfig::_debug方法的具体用法?PHP VmConfig::_debug怎么用?PHP VmConfig::_debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VmConfig的用法示例。


在下文中一共展示了VmConfig::_debug方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showDebug

 static function showDebug($override = false)
 {
     if (self::$_debug === NULL or $override != false) {
         if ($override) {
             $debug = $override;
             $dev = $override;
         } else {
             $debug = VmConfig::get('debug_enable', 'none');
             $dev = VmConfig::get('vmdev', 0);
         }
         //$debug = 'all';	//this is only needed, when you want to debug THIS file
         // 1 show debug only to admins
         if ($debug === 'admin') {
             if (VmConfig::$echoAdmin) {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         } else {
             if ($debug === 'all') {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         }
         if ($dev === 'admin') {
             if (VmConfig::$echoAdmin) {
                 $dev = TRUE;
             } else {
                 $dev = FALSE;
             }
         } else {
             if ($dev === 'all') {
                 $dev = TRUE;
             } else {
                 $dev = FALSE;
             }
         }
         self::setErrorReporting($dev);
     }
     return self::$_debug;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:42,代码来源:config.php

示例2: showDebug

 static function showDebug()
 {
     if (self::$_debug === NULL) {
         $debug = VmConfig::get('debug_enable', 'none');
         //$debug = 'all';	//this is only needed, when you want to debug THIS file
         // 1 show debug only to admins
         if ($debug === 'admin') {
             if (VmConfig::$echoAdmin) {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         } else {
             if ($debug === 'all') {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         }
     }
     if (self::$_debug) {
         ini_set('display_errors', '1');
     } else {
         $jconfig = JFactory::getConfig();
         if ($jconfig->get('error_reporting') == 'none') {
             ini_set('display_errors', '0');
             if (version_compare(phpversion(), '5.4.0', '<')) {
                 error_reporting(E_ALL & ~E_STRICT);
             } else {
                 error_reporting(E_ALL ^ E_STRICT);
             }
         }
     }
     return self::$_debug;
 }
开发者ID:lenard112,项目名称:cms,代码行数:35,代码来源:config.php

示例3: showDebug

 static function showDebug()
 {
     //return self::$_debug = true;	//this is only needed, when you want to debug THIS file
     if (self::$_debug === NULL) {
         $debug = VmConfig::get('debug_enable', 'none');
         // 			$app = JFactory::getApplication();
         // 			$app ->enqueueMessage($debug);
         // 1 show debug only to admins
         if ($debug === 'admin') {
             if (!class_exists('Permissions')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
             }
             if (Permissions::getInstance()->check('admin')) {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         } else {
             if ($debug === 'all') {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         }
     }
     return self::$_debug;
 }
开发者ID:romuland,项目名称:khparts,代码行数:27,代码来源:config.php

示例4: showDebug

 static function showDebug()
 {
     if (self::$_debug === NULL) {
         $debug = VmConfig::get('debug_enable', 'none');
         //$debug = 'all';	//this is only needed, when you want to debug THIS file
         // 1 show debug only to admins
         if ($debug === 'admin') {
             if (!class_exists('Permissions')) {
                 require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
             }
             if (Permissions::getInstance()->check('admin')) {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         } else {
             if ($debug === 'all') {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         }
         if (self::$_debug) {
             ini_set('display_errors', '1');
             //error_reporting(E_ALL ^ E_STRICT);
         } else {
             ini_set('display_errors', '0');
             if (version_compare(phpversion(), '5.4.0', '<')) {
                 error_reporting(E_ALL & ~E_STRICT);
             } else {
                 error_reporting(E_ALL ^ E_STRICT);
             }
         }
     }
     //$nu = $ha;
     return self::$_debug;
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:37,代码来源:config.php

示例5: showDebug

 static function showDebug()
 {
     //return self::$_debug = true;	//this is only needed, when you want to debug THIS file
     if (self::$_debug === NULL) {
         $debug = VmConfig::get('debug_enable', 'none');
         // 1 show debug only to admins
         if ($debug === 'admin') {
             JLoader::register('Permissions', JPATH_VM_ADMINISTRATOR . '/helpers/permissions.php');
             if (Permissions::getInstance()->check('admin')) {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         } else {
             if ($debug === 'all') {
                 self::$_debug = TRUE;
             } else {
                 self::$_debug = FALSE;
             }
         }
     }
     return self::$_debug;
 }
开发者ID:denis1001,项目名称:Virtuemart-2-Joomla-3-Bootstrap,代码行数:23,代码来源:config.php

示例6: showDebug

	static function showDebug($override=false){

		if(self::$_debug===NULL or $override!=false){
			if($override) {
				$debug = $override;
				$dev = $override;
			} else {
				$debug = VmConfig::get('debug_enable','none');
				$dev = VmConfig::get('vmdev',0);
			}
			//$debug = 'all';	//this is only needed, when you want to debug THIS file
			// 1 show debug only to admins
			if($debug === 'admin' ){
				if(VmConfig::$echoAdmin){
					self::$_debug = TRUE;
				} else {
					self::$_debug = FALSE;
				}
			}
			// 2 show debug to anyone
			else {
				if ($debug === 'all') {
					self::$_debug = TRUE;
				}
				// else dont show debug
				else {
					self::$_debug = FALSE;
				}
			}

			if($dev === 'admin' ){
				if(VmConfig::$echoAdmin){
					$dev = TRUE;
				} else {
					$dev = FALSE;
				}
			}
			// 2 show debug to anyone
			else {
				if ($dev === 'all') {
					$dev = TRUE;
				}
				// else dont show debug
				else {
					$dev = FALSE;
				}
			}

			if($dev){
				ini_set('display_errors', '-1');
				if(version_compare(phpversion(),'5.4.0','<' )){
					vmdebug('PHP 5.3');
					error_reporting( E_ALL ^ E_STRICT );
				} else {
					vmdebug('PHP 5.4');
					error_reporting( E_ALL );
				}
				vmdebug('Show All Errors');

			} else {
				$jconfig = JFactory::getConfig();
				$errep = $jconfig->get('error_reporting');
				if ( $errep == 'none' or $errep == 'default') {
					ini_set('display_errors', '1');
					error_reporting(E_ERROR | E_WARNING | E_PARSE);
					vmdebug('Show only Errors, warnings, parse errors');
				}
			}
		}

		return self::$_debug;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:72,代码来源:config.php


注:本文中的VmConfig::_debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。