private static function _getLogHeadingLine($fCurrentTimeStamp, $nElapsed, $sCallerClass, $sCallerFunction)
 {
     static $_iPageLoadID;
     static $_nGMTOffset;
     $_nGMTOffset = isset($_nGMTOffset) ? $_nGMTOffset : get_option('gmt_offset');
     $_iPageLoadID = $_iPageLoadID ? $_iPageLoadID : uniqid();
     $_nNow = $fCurrentTimeStamp + $_nGMTOffset * 60 * 60;
     $_nMicroseconds = str_pad(round(($_nNow - floor($_nNow)) * 10000), 4, '0');
     $_aOutput = array(date("Y/m/d H:i:s", $_nNow) . '.' . $_nMicroseconds, self::_getFormattedElapsedTime($nElapsed), $_iPageLoadID, LesserAdminPageFramework_Registry::getVersion(), $sCallerClass . '::' . $sCallerFunction, current_filter(), self::getCurrentURL());
     return implode(' ', $_aOutput);
 }
Ejemplo n.º 2
0
 public function __construct($sLibraryPath = __FILE__)
 {
     if (!$this->_isLoadable()) {
         return;
     }
     LesserAdminPageFramework_Registry::setUp($sLibraryPath);
     if (LesserAdminPageFramework_Registry::$bIsMinifiedVersion) {
         return;
     }
     include LesserAdminPageFramework_Registry::$sAutoLoaderPath;
     new LesserAdminPageFramework_RegisterClasses(empty(LesserAdminPageFramework_Registry::$aClassFiles) ? LesserAdminPageFramework_Registry::$sDirPath : '', array('exclude_class_names' => array('LesserAdminPageFramework_MinifiedVersionHeader', 'LesserAdminPageFramework_BeautifiedVersionHeader')), LesserAdminPageFramework_Registry::$aClassFiles);
     LesserAdminPageFramework_Registry::$bIsDevelopmentVersion = class_exists('LesserAdminPageFramework_InclusionClassFilesHeader');
 }
 protected function _getDebugInfo($sFieldsType)
 {
     if (!$this->isDebugModeEnabled()) {
         return '';
     }
     if (!in_array($sFieldsType, array('widget', 'post_meta_box', 'page_meta_box', 'user_meta'))) {
         return '';
     }
     return "<div class='admin-page-framework-info'>" . 'Debug Info: ' . LesserAdminPageFramework_Registry::NAME . ' ' . LesserAdminPageFramework_Registry::getVersion() . "</div>";
 }
 public static function _setLibraryData()
 {
     self::$_aLibraryData = array('sName' => LesserAdminPageFramework_Registry::NAME, 'sURI' => LesserAdminPageFramework_Registry::URI, 'sScriptName' => LesserAdminPageFramework_Registry::NAME, 'sLibraryName' => LesserAdminPageFramework_Registry::NAME, 'sLibraryURI' => LesserAdminPageFramework_Registry::URI, 'sPluginName' => '', 'sPluginURI' => '', 'sThemeName' => '', 'sThemeURI' => '', 'sVersion' => LesserAdminPageFramework_Registry::getVersion(), 'sDescription' => LesserAdminPageFramework_Registry::DESCRIPTION, 'sAuthor' => LesserAdminPageFramework_Registry::AUTHOR, 'sAuthorURI' => LesserAdminPageFramework_Registry::AUTHOR_URI, 'sTextDomain' => LesserAdminPageFramework_Registry::TEXT_DOMAIN, 'sDomainPath' => LesserAdminPageFramework_Registry::TEXT_DOMAIN_PATH, 'sNetwork' => '', '_sitewide' => '');
     return self::$_aLibraryData;
 }
 private function _getFormattedSystemInformation($asCustomData)
 {
     $_aData = $this->getAsArray($asCustomData);
     $_aData = $_aData + array('Admin Page Framework' => isset($_aData['Admin Page Framework']) ? null : LesserAdminPageFramework_Registry::getInfo(), 'WordPress' => $this->_getSiteInfoWithCache(!isset($_aData['WordPress'])), 'PHP' => $this->_getPHPInfo(!isset($_aData['PHP'])), 'PHP Error Log' => $this->_getErrorLogByType('php', !isset($_aData['PHP Error Log'])), 'MySQL' => isset($_aData['MySQL']) ? null : $this->getMySQLInfo(), 'MySQL Error Log' => $this->_getErrorLogByType('mysql', !isset($_aData['MySQL Error Log'])), 'Server' => $this->_getWebServerInfo(!isset($_aData['Server'])), 'Browser' => $this->_getClientInfo(!isset($_aData['Browser'])));
     return array_filter($_aData);
 }