public static function open($fileName)
    {
        self::checkRequirements();

        if (!file_exists($fileName) || !is_readable($fileName))
            throw new Exception('Could not open file: '.$fileName);

        $type = self::detectArchiveType($fileName);
        if (!self::canOpenType($type)) {
            return null;
        }

        return new self($fileName, $type);
    }
public static function open($fileName)
    {
        self::checkRequirements();

        if (!file_exists($fileName) || !is_readable($fileName))
            throw new Exception('Could not open file: '.$fileName);

        $type = self::detectArchiveType($fileName);
        if (!self::canOpenType($type)) {
            return null;
        }

        return new self($fileName, $type);
    }
public static function open ( $ fileName ) { self :: checkRequirements ( ) ; if ( ! file_exists ( $ fileName ) || ! is_readable ( $ fileName ) ) throw new Exception ( 'Could not open file: ' . $ fileName ) ; $ type = self :: detectArchiveType ( $ fileName ) ; if ( ! self :: canOpenType ( $ type ) ) { return null ; } return new self ( $ fileName , $ type ) ; }
Creates instance with right type.
@param  string $fileName Filename
@return UnifiedArchive|null Returns UnifiedArchive in case of successful reading of the file
@throws \Exception
Creates instance with right type .