isExpired() public méthode

Determine if the view at the given path is expired.
public isExpired ( ) : boolean
Résultat boolean
 /**
  * Get translations.
  *
  * @return array|mixed
  */
 public function getTranslations()
 {
     // File cached path
     $filePath = $this->compiler->getFilePath();
     // If the file exists
     if (file_exists($filePath)) {
         // Check if is not expired
         if (!$this->compiler->isExpired()) {
             // Return the cached file in
             // an array
             return json_decode(file_get_contents($filePath));
         }
     }
     return $this->cacheFromConfig();
 }