ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
getid3_efax Class Reference

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

+ Inheritance diagram for getid3_efax:
+ Collaboration diagram for getid3_efax:

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)
 

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.graphic.efax.php.

Member Function Documentation

◆ Analyze()

getid3_efax::Analyze ( )

Definition at line 21 of file module.graphic.efax.php.

References $info, getid3_handler\fread(), getid3_handler\fseek(), and getid3_lib\LittleEndian2Int().

21  {
22  $info = &$this->getid3->info;
23 
24  $this->fseek($info['avdataoffset']);
25  $efaxheader = $this->fread(1024);
26 
27  $info['efax']['header']['magic'] = substr($efaxheader, 0, 2);
28  if ($info['efax']['header']['magic'] != "\xDC\xFE") {
29  $info['error'][] = 'Invalid eFax byte order identifier (expecting DC FE, found '.getid3_lib::PrintHexBytes($info['efax']['header']['magic']).') at offset '.$info['avdataoffset'];
30  return false;
31  }
32  $info['fileformat'] = 'efax';
33 
34  $info['efax']['header']['filesize'] = getid3_lib::LittleEndian2Int(substr($efaxheader, 2, 4));
35  if ($info['efax']['header']['filesize'] != $info['filesize']) {
36  $info['error'][] = 'Probable '.(($info['efax']['header']['filesize'] > $info['filesize']) ? 'truncated' : 'corrupt').' file, expecting '.$info['efax']['header']['filesize'].' bytes, found '.$info['filesize'].' bytes';
37  }
38  $info['efax']['header']['software1'] = rtrim(substr($efaxheader, 26, 32), "\x00");
39  $info['efax']['header']['software2'] = rtrim(substr($efaxheader, 58, 32), "\x00");
40  $info['efax']['header']['software3'] = rtrim(substr($efaxheader, 90, 32), "\x00");
41 
42  $info['efax']['header']['pages'] = getid3_lib::LittleEndian2Int(substr($efaxheader, 198, 2));
43  $info['efax']['header']['data_bytes'] = getid3_lib::LittleEndian2Int(substr($efaxheader, 202, 4));
44 
45 $info['error'][] = 'eFax parsing not enabled in this version of getID3() ['.$this->getid3->version().']';
46 return false;
47 
48  return true;
49  }
LittleEndian2Int($byteword, $signed=false)
Definition: getid3.lib.php:266
$info
Definition: example_052.php:80
fread($bytes)
Definition: getid3.php:1685
fseek($bytes, $whence=SEEK_SET)
Definition: getid3.php:1697
+ Here is the call graph for this function:

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