Fenos\Notifynder\Translator\Compiler::getFilePath PHP Method

getFilePath() public method

Get cached file.
public getFilePath ( ) : string
return string
    public function getFilePath()
    {
        return $this->getCompiledPath('notification_categories');
    }

Usage Example

Esempio n. 1
0
 /**
  * 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();
 }
All Usage Examples Of Fenos\Notifynder\Translator\Compiler::getFilePath