public function validateAssetFile($file)
    {
        $filePath = substr($file, 1);

        if (!is_file($filePath))
            throw new FileNotFoundException("File ".$filePath." was not found");

        $path_parts = pathinfo($filePath);

        if( !in_array($path_parts['extension'], array(
            "js", "css", "png", "jpg", "jpeg", "gif", "ttf", "otf", "woff"
        )))
            throw new WrongFileExtensionException("Wrong file format\n
            Supported formats: js, css, png, jpg, jpeg, gif, ttf, otf, woff");
    }
public function validateAssetFile($file)
    {
        $filePath = substr($file, 1);

        if (!is_file($filePath))
            throw new FileNotFoundException("File ".$filePath." was not found");

        $path_parts = pathinfo($filePath);

        if( !in_array($path_parts['extension'], array(
            "js", "css", "png", "jpg", "jpeg", "gif", "ttf", "otf", "woff"
        )))
            throw new WrongFileExtensionException("Wrong file format\n
            Supported formats: js, css, png, jpg, jpeg, gif, ttf, otf, woff");
    }
public function validateAssetFile ( $ file ) { $ filePath = substr ( $ file , 1 ) ; if ( ! is_file ( $ filePath ) ) throw new FileNotFoundException ( "File " . $ filePath . " was not found" ) ; $ path_parts = pathinfo ( $ filePath ) ; if ( ! in_array ( $ path_parts [ 'extension' ] , array ( "js" , "css" , "png" , "jpg" , "jpeg" , "gif" , "ttf" , "otf" , "woff" ) ) ) throw new WrongFileExtensionException ( "Wrong file format\n
            Supported formats: js, css, png, jpg, jpeg, gif, ttf, otf, woff" ) ; }
Checks if asset exists at provided path, and is of supported format

@param string $file     Path to file (prefixed with @)

@throws \Netgen\HtmlPdfApi\Exception\FileNotFoundException
@throws \Netgen\HtmlPdfApi\Exception\WrongFileExtensionException
Checks if asset exists at provided path and is of supported format