コード例 #1
0
ファイル: File.php プロジェクト: Getty/historical-php-rapidev
 public function Load($Key)
 {
     if (is_array($Key)) {
         $Key = implode(DIR_SEP, $Key);
     }
     if (is_file($this->DefaultFiledir . DIR_SEP . $Key)) {
         return unserialize(RD_Util::Read($this->DefaultFiledir . DIR_SEP . $Key));
     }
     return NULL;
 }
コード例 #2
0
ファイル: Text.php プロジェクト: Getty/historical-php-rapidev
 public function __construct($Identifier, $Args = array(), $Translated = false)
 {
     $this->Identifier = $Identifier;
     if (isset(self::$TextGathering)) {
         RD_Util::WriteLn(self::$TextGathering, $Identifier);
     }
     if ($Args === true) {
         $Args = array();
         $Translated = true;
     }
     $this->Args = $Args;
     $this->Translated = $Translated;
     self::$TextObjects[] = $this;
 }
コード例 #3
0
 public static function EchoDebugDump($var)
 {
     if (self::$Debug && !RD_Util::IsCLI()) {
         $Callback = self::$HTTPDebugFunction;
         if (self::$EchoHTTPDebugFunction) {
             echo RDC::Call($Callback, array($var));
         } else {
             RDC::Call($Callback, array($var));
         }
     } elseif (RD_Util::IsCLI()) {
         $Func = self::$CLIDebugFunction;
         if (self::$EchoCLIDebugFunction) {
             echo $Func($var);
         } else {
             $Func($var);
         }
     }
 }
コード例 #4
0
ファイル: RD.php プロジェクト: Getty/historical-php-rapidev
 public function IsCLI()
 {
     if (!isset($this->CLI)) {
         $this->CLI = RD_Util::IsCLI();
     }
     return $this->CLI;
 }
コード例 #5
0
ファイル: View.php プロジェクト: Getty/historical-php-rapidev
 public function HookCleanup()
 {
     if ($this->ConsoleDebug && !RD_Util::IsCLI()) {
         $RD_View = $this->ViewGenerate();
         $this->ConsoleDebug = false;
         $Vars = array();
         $Vars['STAGE'] = STAGE;
         $Vars['Contexts'] = $this->ConsoleDebugData;
         $Vars['Log'] = RDD::GetLog();
         $Vars['CoreCache'] = $this->GetCoreCache();
         $Vars['Roots'] = $this->GetRoots();
         $Vars['LoadedModules'] = $this->GetLoadedModules();
         $Vars['_COOKIE'] = $_COOKIE;
         $Vars['_GET'] = $_GET;
         $Vars['_POST'] = $_POST;
         $Vars['_SESSION'] = $_SESSION;
         $Vars['_SERVER'] = $_SERVER;
         $Vars['_FILES'] = $_FILES;
         $QMPos = strpos($_SERVER['PHP_SELF'], '?');
         if ($QMPos === false) {
             $Filename = $_SERVER['DOCUMENT_ROOT'] . $_SERVER['PHP_SELF'];
         } else {
             $Filename = $_SERVER['DOCUMENT_ROOT'] . substr($_SERVER['PHP_SELF'], 0, $QMPos);
         }
         $Vars['Filename'] = $Filename;
         if (is_readable($Filename)) {
             $Vars['FileContent'] = file_get_contents($Filename);
             $Vars['FileAccess'] = fileatime($Filename);
             $Vars['FileModify'] = filemtime($Filename);
             $Vars['FileSize'] = filesize($Filename);
         }
         $Vars['LastLog'] = end($Vars['Log']);
         $Vars['MaxExecTime'] = ini_get('max_execution_time');
         $Vars['MemoryLimit'] = ini_get('memory_limit');
         $Vars['ExtraInformation'] = $this->ConsoleDebugInformation;
         $RD_View->Assign($Vars);
         $RD_View->Display('debug/console.tpl');
         $this->ConsoleDebug = true;
     }
 }