當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。