public static function parseFromFile($filename)
    {
        if (file_exists($filename) && is_readable($filename)) {
            return new self(file_get_contents($filename));
        } else {
            throw new \RuntimeException(sprintf("File %s is not readable, or doesn't exist.", $filename));
        }
    }
public static function parseFromFile($filename)
    {
        if (file_exists($filename) && is_readable($filename)) {
            return new self(file_get_contents($filename));
        } else {
            throw new \RuntimeException(sprintf("File %s is not readable, or doesn't exist.", $filename));
        }
    }
public static function parseFromFile ( $ filename ) { if ( file_exists ( $ filename ) && is_readable ( $ filename ) ) { return new self ( file_get_contents ( $ filename ) ) ; } else { throw new \ RuntimeException ( sprintf ( "File %s is not readable, or doesn't exist." , $ filename ) ) ; } }
Helper function to parse a file directly.

@param string $filename
@return self
Helper function to parse a file directly .