Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 4
0
 public function IsCLI()
 {
     if (!isset($this->CLI)) {
         $this->CLI = RD_Util::IsCLI();
     }
     return $this->CLI;
 }
Ejemplo n.º 5
0
 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;
     }
 }