public static function zipExtract(String $source, String $target = NULL) : Bool
    {
        $source = Info::rpath($source);
        $target = Info::rpath($target);

        $source = Base::suffix($source, '.zip');

        if( ! file_exists($source) )
        {
            throw new Exception\FileNotFoundException(NULL, $source);
        }

        if( empty($target) )
        {
            $target = Extension::remove($source);
        }

        $zip = new ZipArchive;

        if( $zip->open($source) === true )
        {
            $zip->extractTo($target);
            $zip->close();

            return true;
        }
        else
        {
            return false;
        }
    }
public static function zipExtract(String $source, String $target = NULL) : Bool
    {
        $source = Info::rpath($source);
        $target = Info::rpath($target);

        $source = Base::suffix($source, '.zip');

        if( ! file_exists($source) )
        {
            throw new Exception\FileNotFoundException(NULL, $source);
        }

        if( empty($target) )
        {
            $target = Extension::remove($source);
        }

        $zip = new ZipArchive;

        if( $zip->open($source) === true )
        {
            $zip->extractTo($target);
            $zip->close();

            return true;
        }
        else
        {
            return false;
        }
    }
public static function zipExtract ( String $ source , String $ target = NULL ) : Bool { $ source = Info :: rpath ( $ source ) ; $ target = Info :: rpath ( $ target ) ; $ source = Base :: suffix ( $ source , '.zip' ) ; if ( ! file_exists ( $ source ) ) { throw new Exception \ FileNotFoundException ( NULL , $ source ) ; } if ( empty ( $ target ) ) { $ target = Extension :: remove ( $ source ) ; } $ zip = new ZipArchive ; if ( $ zip -> open ( $ source ) === true ) { $ zip -> extractTo ( $ target ) ; $ zip -> close ( ) ; return true ; } else { return false ; } }
Extracts a zip file to the specified location.

@param string $source
@param string $target

@return bool
Extracts a zip file to the specified location .