示例#1
0
文件: debug.php 项目: jonlb/JxCMS
 public static function dump($variable, $label = NULL, $type = 'log')
 {
     if (class_exists('Fire')) {
         switch ($type) {
             case 'info':
                 Fire::info($variable, $label);
                 break;
             case 'log':
                 Fire::log($variable, $label);
                 break;
             case 'warn':
                 Fire::warn($variable, $label);
                 break;
             case 'error':
                 Fire::error($variable, $label);
                 break;
             case 'dump':
                 Fire::dump($variable, $label);
                 break;
         }
     } else {
         if (isset($label)) {
             echo $label . ":";
         }
         echo "<br><pre>";
         var_dump($variable);
         echo "</pre><br>";
     }
 }
示例#2
0
 public function before()
 {
     parent::before();
     Fire::info($this->request, 'Before() called');
 }
示例#3
0
 public function parse_post(array $post)
 {
     Fire::info($post);
     $stream = array();
     foreach ($post as $name => $value) {
         if (strpos($name, Facebook_Stream::$input_prefix) !== FALSE) {
             $stream[substr($name, strlen(Facebook_Stream::$input_prefix))] = $value;
         }
     }
     Fire::info($stream, 'strpos');
     $stream = $this->explodeTree($stream, '-');
     Fire::info($stream, 'tree');
     $stream = array_intersect_key($stream, $this->_stream);
     Fire::info($stream, 'intersect');
     Fire::info($this->_stream, '_stream');
     $this->_stream = Arr::merge($this->_stream, $stream);
     Fire::info($this->_stream, 'merge');
     if (isset($this->_stream['attachment'])) {
         $this->_attachment->values($this->_stream['attachment']);
     }
     Fire::info($this);
     return $this;
 }