protected function extractArchive($archiveFile)
    {
        $archiveDir    = dirname($archiveFile);
        $archiveObj    = new ZipArchive();
        $archiveHandle = $archiveObj->open($archiveFile);
        if (true !== $archiveHandle) {
            return array('error' => __('Could not open archive'));
        }

        if (!$archiveObj->extractTo($archiveDir)) {
            $archiveObj->close();
            return array('error' => __('Could not extract archive'));
        }
        $archiveObj->close();
        return $archiveDir;
    }
protected function extractArchive($archiveFile)
    {
        $archiveDir    = dirname($archiveFile);
        $archiveObj    = new ZipArchive();
        $archiveHandle = $archiveObj->open($archiveFile);
        if (true !== $archiveHandle) {
            return array('error' => __('Could not open archive'));
        }

        if (!$archiveObj->extractTo($archiveDir)) {
            $archiveObj->close();
            return array('error' => __('Could not extract archive'));
        }
        $archiveObj->close();
        return $archiveDir;
    }
protected function extractArchive ( $ archiveFile ) { $ archiveDir = dirname ( $ archiveFile ) ; $ archiveObj = new ZipArchive ( ) ; $ archiveHandle = $ archiveObj -> open ( $ archiveFile ) ; if ( true !== $ archiveHandle ) { return array ( 'error' => __ ( 'Could not open archive' ) ) ; } if ( ! $ archiveObj -> extractTo ( $ archiveDir ) ) { $ archiveObj -> close ( ) ; return array ( 'error' => __ ( 'Could not extract archive' ) ) ; } $ archiveObj -> close ( ) ; return $ archiveDir ; }
Unzip archive from icomoon

@param $archiveFile
@return array|string
Unzip archive from icomoon