/**
  * Return parsed sheet
  * @return LaravelExcelWorksheet
  */
 public function parsed()
 {
     // If parser is set, use it
     if ($this->parser) {
         return $this->parser->parse($this);
     }
     // Else return the entire sheet
     return $this;
 }
Пример #2
0
 public function stream_open($file, $mode, $options, &$opened_path)
 {
     $this->position = 0;
     $file = str_replace('view://', '', $file);
     $this->data = file_get_contents($file);
     if ($this->data === false) {
         $this->status = stat($file);
         return false;
     } else {
         $this->length = strlen($this->data);
     }
     $parser = new ViewParser();
     /*
     if(!ini_get('short_open_tag')){
         $search[] = '<? ';
         $search[] = '<?=';
         $replace[] = '<?php ';
         $replace[] = '<?php echo ';
         $this->data = str_replace($search, $replace, $this->data);
     }
     
     $this->data = str_replace('@$', '$this->', $this->data);
     $this->data = str_replace('parent->', 'getParent()->', $this->data);
     */
     $this->data = $parser->parse($this->data);
     $this->status = array('mode' => 0100777, 'size' => strlen($this->data));
     return true;
 }