Exemplo n.º 1
0
 public function get_data($force_read_file = false)
 {
     if ($this->content && !$force_read_file) {
         return $this->content;
     }
     $file = $this->get_data_file_path();
     if (!file_exists($file)) {
         $file = $this->config->templates_path . '/' . $this->settings->get('template', 'active') . '/sample.json.php';
     }
     if (!file_exists($file)) {
         return array();
     }
     $file = new Data_File($file, $this->config);
     $this->content = $file->read();
     $this->content = $this->hook->apply('content_get_data', $this->content);
     return $this->content;
 }
Exemplo n.º 2
0
 function write()
 {
     parent::write($this->data, $this->filesystem);
 }