UAParser\Exception\FileNotFoundException::fileNotFound PHP Méthode

fileNotFound() public static méthode

public static fileNotFound ( $file )
    public static function fileNotFound($file)
    {
        return new static(sprintf('File "%s" does not exist', $file));
    }

Usage Example

Exemple #1
0
 /**
  * @param string $yamlFile
  * @param bool $backupBeforeOverride
  * @throws FileNotFoundException
  */
 public function convertFile($yamlFile, $backupBeforeOverride = true)
 {
     if (!$this->fs->exists($yamlFile)) {
         throw FileNotFoundException::fileNotFound($yamlFile);
     }
     $this->doConvert(Yaml::parse(file_get_contents($yamlFile)), $backupBeforeOverride);
 }