Hostnet\Component\Webpack\Asset\TrackedFiles::modifiedAfter PHP Method

modifiedAfter() public method

Is one of the Tracked files in this set changed later than the other set.
public modifiedAfter ( TrackedFiles $other ) : boolean
$other TrackedFiles the other set of files to compare to.
return boolean true if this set if this set is modified after (later) the other set.
    public function modifiedAfter(TrackedFiles $other)
    {
        return $this->modification_time > $other->modification_time;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Returns true if the cache is outdated.
  *
  * @return bool true, cache is outdated of non exsitant.
  */
 public function isOutdated()
 {
     $this->boot();
     $compiled_tracked_files = new TrackedFiles([$this->output_dir]);
     $current_tracked_files = new TrackedFiles($this->paths);
     if ($current_tracked_files->modifiedAfter($compiled_tracked_files)) {
         $this->profiler->set('tracker.reason', 'One of the tracked files has been modified.');
         return true;
     }
     $this->profiler->set('tracker.reason', false);
     return false;
 }
All Usage Examples Of Hostnet\Component\Webpack\Asset\TrackedFiles::modifiedAfter