ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
getid3_rar Class Reference

getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g // More...

+ Inheritance diagram for getid3_rar:
+ Collaboration diagram for getid3_rar:

Public Member Functions

 Analyze ()
 
- Public Member Functions inherited from getid3_handler
 __construct (getID3 $getid3, $call_module=null)
 
 Analyze ()
 
 AnalyzeString ($string)
 
 setStringMode ($string)
 
 saveAttachment ($name, $offset, $length, $image_mime=null)
 

Data Fields

 $option_use_rar_extension = false
 

Additional Inherited Members

- Protected Member Functions inherited from getid3_handler
 ftell ()
 
 fread ($bytes)
 
 fseek ($bytes, $whence=SEEK_SET)
 
 feof ()
 
 isDependencyFor ($module)
 
 error ($text)
 
 warning ($text)
 
 notice ($text)
 
- Protected Attributes inherited from getid3_handler
 $getid3
 
 $data_string_flag = false
 
 $data_string = ''
 
 $data_string_position = 0
 
 $data_string_length = 0
 

Detailed Description

getID3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //

Definition at line 18 of file module.archive.rar.php.

Member Function Documentation

◆ Analyze()

getid3_rar::Analyze ( )

Reimplemented from getid3_handler.

Definition at line 23 of file module.archive.rar.php.

23 {
24 $info = &$this->getid3->info;
25
26 $info['fileformat'] = 'rar';
27
28 if ($this->option_use_rar_extension === true) {
29 if (function_exists('rar_open')) {
30 if ($rp = rar_open($info['filenamepath'])) {
31 $info['rar']['files'] = array();
32 $entries = rar_list($rp);
33 foreach ($entries as $entry) {
34 $info['rar']['files'] = getid3_lib::array_merge_clobber($info['rar']['files'], getid3_lib::CreateDeepArray($entry->getName(), '/', $entry->getUnpackedSize()));
35 }
36 rar_close($rp);
37 return true;
38 } else {
39 $this->error('failed to rar_open('.$info['filename'].')');
40 }
41 } else {
42 $this->error('RAR support does not appear to be available in this PHP installation');
43 }
44 } else {
45 $this->error('PHP-RAR processing has been disabled (set $getid3_rar->option_use_rar_extension=true to enable)');
46 }
47 return false;
48
49 }
error($text)
Definition: getid3.php:1752
static CreateDeepArray($ArrayPath, $Separator, $Value)
Definition: getid3.lib.php:491
static array_merge_clobber($array1, $array2)
Definition: getid3.lib.php:384
$info
Definition: index.php:5

References $info, getid3_lib\array_merge_clobber(), getid3_lib\CreateDeepArray(), and getid3_handler\error().

+ Here is the call graph for this function:

Field Documentation

◆ $option_use_rar_extension

getid3_rar::$option_use_rar_extension = false

Definition at line 21 of file module.archive.rar.php.


The documentation for this class was generated from the following file: