ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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

 getid3_rar (&$fd, &$ThisFileInfo)
 
 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 17 of file module.archive.rar.php.

Member Function Documentation

◆ Analyze()

getid3_rar::Analyze ( )

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

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

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  $info['error'][] = 'failed to rar_open('.$info['filename'].')';
40  }
41  } else {
42  $info['error'][] = 'RAR support does not appear to be available in this PHP installation';
43  }
44  } else {
45  $info['error'][] = 'PHP-RAR processing has been disabled (set $getid3_rar->option_use_rar_extension=true to enable)';
46  }
47  return false;
48 
49  }
array_merge_clobber($array1, $array2)
Definition: getid3.lib.php:358
$info
Definition: example_052.php:80
CreateDeepArray($ArrayPath, $Separator, $Value)
Definition: getid3.lib.php:465
+ Here is the call graph for this function:

◆ getid3_rar()

getid3_rar::getid3_rar ( $fd,
$ThisFileInfo 
)

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

20  {
21 
22  $ThisFileInfo['fileformat'] = 'rar';
23 
24  $ThisFileInfo['error'][] = 'RAR parsing not enabled in this version of getID3()';
25  return false;
26 
27  }

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: