public function fromFile($file)
    {
        try {
            $data = file_get_contents($file);
            if ($data !== false) {
                return $this->parser->parse($data);
            }
            throw new \InvalidArgumentException("file could not be loaded");
        } catch (\Exception $e) {
            throw new \InvalidArgumentException("file could not be loaded (" . $e->getMessage() . ")");
        }
    }
public function fromFile($file)
    {
        try {
            $data = file_get_contents($file);
            if ($data !== false) {
                return $this->parser->parse($data);
            }
            throw new \InvalidArgumentException("file could not be loaded");
        } catch (\Exception $e) {
            throw new \InvalidArgumentException("file could not be loaded (" . $e->getMessage() . ")");
        }
    }
public function fromFile ( $ file ) { try { $ data = file_get_contents ( $ file ) ; if ( $ data !== false ) { return $ this -> parser -> parse ( $ data ) ; } throw new \ InvalidArgumentException ( "file could not be loaded" ) ; } catch ( \ Exception $ e ) { throw new \ InvalidArgumentException ( "file could not be loaded (" . $ e -> getMessage ( ) . ")" ) ; } }
Loads icon from file.

@param string $file filename or URL (if fopen wrappers installed)
@return Icon
@throws \InvalidArgumentException if file is not found or invalid
Loads icon from file .