W3cubDocs

/CakePHP 3.4

Class MoFileParser

Parses file in PO format

Namespace: Cake\I18n\Parser
Copyright: Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/)
Copyright: Copyright (c) 2014, Fabien Potencier https://github.com/symfony/Translation/blob/master/LICENSE
Location: I18n/Parser/MoFileParser.php

Constants summary

Method Summary

  • _readLong() protected
    Reads an unsigned long from stream respecting endianess.
  • parse() public

    Parses machine object (MO) format, independent of the machine's endian it was created on. Both 32bit and 64bit systems are supported.

Method Detail

_readLong()source protected

_readLong( resource $stream , boolean $isBigEndian )

Reads an unsigned long from stream respecting endianess.

Parameters

resource $stream
The File being read.
boolean $isBigEndian
Whether or not the current platform is Big Endian

Returns

integer

parse()source public

parse( resource $resource )

Parses machine object (MO) format, independent of the machine's endian it was created on. Both 32bit and 64bit systems are supported.

Parameters

resource $resource
The file to be parsed.

Returns

array
List of messages extracted from the file

Throws

RuntimeException
If stream content has an invalid format.

© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.4/class-Cake.I18n.Parser.MoFileParser.html