/** * Class constructor * * @access public */ public function __construct() { parent::__construct(); $this->_title = 'Timeline'; $this->get_prefs(); $this->_since = VGet::since(substr($this->_prefs->_data['last_visit'], 0, 10)); $this->get_timeline(); }
/** * Class constructor * * @access public */ public function __construct() { parent::__construct(); $this->_since = VGet::since(date('Y-m-d')); $this->_url = 'cache/timeline/' . $this->_since . '.json'; if ($this->check_cache() === false) { $this->_content = array('title' => WS_NAME, 'url' => WS_URL, 'content' => array()); $this->get_content(); $cache = new File(); $cache->_content = json_encode($this->_content); $cache->save($this->_url); } else { $cache = File::read($this->_url); $this->_content = json_decode($cache->_content, true); } }