Class MoFileParser
Parses file in MO format
Constants
- 
          
          floatMO_BIG_ENDIAN_MAGIC ¶0xde120495Magic used for validating the format of a MO file as well as detecting if the machine used to create that file was big endian. 
- 
          
          intMO_HEADER_SIZE ¶28The size of the header of a MO file in bytes. 
- 
          
          floatMO_LITTLE_ENDIAN_MAGIC ¶0x950412deMagic used for validating the format of a MO file as well as detecting if the machine used to create that file was little endian. 
Method Summary
- 
          _readLong() protectedReads an unsigned long from stream respecting endianess. 
- 
          parse() publicParses machine object (MO) format, independent of the machine's endian it was created on. Both 32bit and 64bit systems are supported. 
Method Detail
_readLong() ¶ protected
_readLong(resource $stream, bool $isBigEndian): intReads an unsigned long from stream respecting endianess.
Parameters
- 
                resource$stream
- The File being read. 
- 
                bool$isBigEndian
- Whether or not the current platform is Big Endian 
Returns
intparse() ¶ public
parse(string $file): arrayParses machine object (MO) format, independent of the machine's endian it was created on. Both 32bit and 64bit systems are supported.
Parameters
- 
                string$file
- The file to be parsed. 
Returns
arrayList of messages extracted from the file
Throws
RuntimeExceptionIf stream content has an invalid format.
