diff --git a/reference/rar/book.xml b/reference/rar/book.xml index d42cb891e4..3859a20a63 100644 --- a/reference/rar/book.xml +++ b/reference/rar/book.xml @@ -26,6 +26,7 @@ &reference.rar.setup; &reference.rar.constants; &reference.rar.examples; + &reference.rar.reference; &reference.rar.rararchive; &reference.rar.rarentry; &reference.rar.rarexception; diff --git a/reference/rar/functions/rar-wrapper-cache-stats.xml b/reference/rar/functions/rar-wrapper-cache-stats.xml new file mode 100644 index 0000000000..7be4e13a12 --- /dev/null +++ b/reference/rar/functions/rar-wrapper-cache-stats.xml @@ -0,0 +1,58 @@ + + + + + + rar_wrapper_cache_stats + Cache hits and misses for the URL wrapper. + + + + &reftitle.description; + + stringrar_wrapper_cache_stats + + + + + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + + + + + + + + diff --git a/reference/rar/rararchive/isbroken.xml b/reference/rar/rararchive/isbroken.xml new file mode 100644 index 0000000000..50fb4ec4d9 --- /dev/null +++ b/reference/rar/rararchive/isbroken.xml @@ -0,0 +1,127 @@ + + + + + + RarArchive::isBroken + rar_broken_is + Test whether an archive is broken (incomplete) + + + + &reftitle.description; + Object oriented style (method): + + public boolRarArchive::isBroken + + + Procedural style: + + boolrar_broken_is + RarArchiverarfile + + + This function determines whether an archive is incomplete, i.e., if a volume is missing or a volume is truncated. + + + + + &reftitle.parameters; + + + + rarfile + + + A RarArchive object, opened with rar_open. + + + + + + + + + &reftitle.returnvalues; + + Returns &true; if the archive is broken, &false; otherwise. This function may also + also return &false; if the passed file has already been closed. The only way + to tell the two cases apart is to enable + exceptions with RarException::setUsingExceptions; however, + this should be unnecessary as a program should not operate on closed files. + + + + + &reftitle.examples; + + + Object oriented style + +isBroken()); +?> +]]> + + &example.outputs.similar; + + + + + + + + Procedural style + + +]]> + + + + + + + &reftitle.seealso; + + + RarArchive::setAllowBroken + + + + + + + diff --git a/reference/rar/rararchive/open.xml b/reference/rar/rararchive/open.xml index 0e5006c3d7..31d1462b4c 100644 --- a/reference/rar/rararchive/open.xml +++ b/reference/rar/rararchive/open.xml @@ -1,4 +1,4 @@ - + @@ -14,13 +14,15 @@ public static RarArchiveRarArchive::open stringfilename - stringpassword + stringpasswordNULL + callbackvolume_callbackNULL Procedural style: RarArchiverar_open stringfilename - stringpassword + stringpasswordNULL + callbackvolume_callbackNULL Open specified RAR archive and return RarArchive instance representing it. @@ -55,6 +57,23 @@ + + volume_callback + + + A function that receives one parameter – the path of the volume + that was not found – and returns a string with the correct path + for such volume or NULL if such volume does + not exist or is not known. The programmer should ensure the + passed function doesn't cause loops as this function is called + repetedly if the path returned in a previous call did not + correspond to the needed volume. Specifying this parameter omits + the notice that would otherwise be emitted whenever a volume is + not found; an implementation that only returns &false; can + therefore be used to merely omit such notices. + + + @@ -70,6 +89,30 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 3.0.0 + + volume_callback was added. + + + + + + + + &reftitle.examples; @@ -144,6 +187,27 @@ echo stream_get_contents($stream); fclose($stream); ?> +]]> + + + + + + Volume Callback + +getEntry('file2.txt'); +$entry->extract(null, dirname(__FILE__) . "/temp_file2.txt"); ]]> diff --git a/reference/rar/rararchive/setallowbroken.xml b/reference/rar/rararchive/setallowbroken.xml new file mode 100644 index 0000000000..e0e0dfe070 --- /dev/null +++ b/reference/rar/rararchive/setallowbroken.xml @@ -0,0 +1,144 @@ + + + + + + RarArchive::setAllowBroken + Whether opening broken archives is allowed + + + + &reftitle.description; + Object oriented style (method): + + public boolRarArchive::setAllowBroken + boolallow_broken + + Procedural style: + + boolrar_allow_broken_set + RarArchiverarfile + boolallow_broken + + + This method defines whether broken archives can be read or all the operations that + attempt to extract the archive entries will fail. Broken archives are archives for + which no error is detected when the file is opened but an error occurs when reading + the entries. + + + + + &reftitle.parameters; + + + + rarfile + + + A RarArchive object, opened with rar_open. + + + + + allow_broken + + + Whether to allow reading broken files (&true;) or not (&false;). + + + + + + + + + &reftitle.returnvalues; + + Returns &true; &return.falseforfailure;. It will only fail if the file has + already been closed. + + + + + &reftitle.examples; + + + Object oriented style + +setAllowBroken(true); +foreach ($a->getEntries() as $e) { + echo "$e\n"; +} +var_dump(count($a)); +?> +]]> + + &example.outputs.similar; + + + + + + + + Procedural style + + +]]> + + + + + + + &reftitle.seealso; + + + RarArchive::isBroken + + + + + + + diff --git a/reference/rar/rarentry.xml b/reference/rar/rarentry.xml index 18eb1790f4..cd0508e187 100644 --- a/reference/rar/rarentry.xml +++ b/reference/rar/rarentry.xml @@ -564,7 +564,8 @@ RarEntry::ATTRIBUTE_UNIX_FINAL_QUARTET - Mask to isolate the last four bits of UNIX attributes. To be used with + Mask to isolate the last four bits (nibble) of UNIX attributes + (_S_IFMT, the type of file mask). To be used with RarEntry::getAttr on entries whose host OS is UNIX and with the constants RarEntry::ATTRIBUTE_UNIX_FIFO, RarEntry::ATTRIBUTE_UNIX_CHAR_DEV, diff --git a/reference/rar/rarentry/extract.xml b/reference/rar/rarentry/extract.xml index 0c622f6c48..e1a393df9c 100644 --- a/reference/rar/rarentry/extract.xml +++ b/reference/rar/rarentry/extract.xml @@ -11,8 +11,9 @@ public boolRarEntry::extract stringdir - stringfilepath - stringpassword + stringfilepath'' + stringpasswordNULL + boolextended_datafalse RarEntry::extract extracts the entry's data. @@ -62,6 +63,16 @@ + + + extended_data + + + If &true;, extended information such as NTFS ACLs and Unix owner information will be set in the extract + files, as long as it's present in the archive. + + + @@ -77,6 +88,30 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 3.0.0 + + extended_data was added. + + + + + + + + &reftitle.examples; diff --git a/reference/rar/rarentry/getstream.xml b/reference/rar/rarentry/getstream.xml index 023babe2b7..12346d6ea3 100644 --- a/reference/rar/rarentry/getstream.xml +++ b/reference/rar/rarentry/getstream.xml @@ -10,7 +10,7 @@ &reftitle.description; - public resourceRarEntry::RarEntry::getStream + public resourceRarEntry::getStream stringpassword diff --git a/reference/rar/rarentry/isdirectory.xml b/reference/rar/rarentry/isdirectory.xml index 72b355e02d..594329e181 100644 --- a/reference/rar/rarentry/isdirectory.xml +++ b/reference/rar/rarentry/isdirectory.xml @@ -10,7 +10,7 @@ &reftitle.description; - public boolRarEntry::RarEntry::isDirectory + public boolRarEntry::isDirectory diff --git a/reference/rar/setup.xml b/reference/rar/setup.xml index bc63193bd9..08bf16f120 100644 --- a/reference/rar/setup.xml +++ b/reference/rar/setup.xml @@ -53,9 +53,15 @@ phpize
&reftitle.resources; - This extension registers two internal classes: - The archive representations returned by rar_open and the - entry representations returned by rar_list and rar_entry_get. + This extension registers three internal classes: + The archive representations returned by rar_open – + RarArchive –, the entry representations returned by + rar_list and rar_entry_get – + RarEntry and the exception type RarException. + + + This extension also register a stream resource, called "rar" and a URL + wrapper called "rar wrapper" and registered under the prefix "rar".
diff --git a/reference/rar/versions.xml b/reference/rar/versions.xml index fb8cf05f67..c0473213a0 100644 --- a/reference/rar/versions.xml +++ b/reference/rar/versions.xml @@ -11,17 +11,24 @@ + + + + + + +