本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}