setTime() public method

Sets the time when the Vars was cached
public setTime ( integer $time ) : CacheProvider
$time integer Time when vars cached was created
return CacheProvider The cacheProvider object
Example #1
0
 /**
  * Loads the cached file into the current class
  */
 private function loadFromCache()
 {
     $this->cache->load();
     $passed_keys = array('path', 'content', 'extensions', 'loaders', 'resources', 'variables');
     $loaded_vars = get_object_vars($this->cache->getLoadedVars());
     foreach ($loaded_vars as $key => $value) {
         if (in_array($key, $passed_keys)) {
             $this->{$key} = $value;
         }
     }
     $this->cache->setTime($loaded_vars['cache']->getTime());
 }