PHP Class Prado\I18N\core\Gettext\TGettext_MO

GNU MO file reader and writer.
Author: Michael Wallner ([email protected])
Inheritance: extends TGettext
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Protected Properties

Свойство Type Description
$_handle resource file handle
$writeBigEndian boolean Whether to write with big endian byte order.

Méthodes publiques

Méthode Description
__construct ( string $file = '' ) : object Constructor
_read ( integer $bytes = 1 ) : mixed _read
_readInt ( boolean $bigendian = false ) : integer _readInt
_readStr ( array $params ) : string _readStr
_write ( string $data ) : integer _write
_writeInt ( integer $int ) : integer _writeInt
_writeStr ( string $string ) : integer _writeStr
load ( string $file = null ) : mixed Load MO file
save ( string $file = null ) : mixed Save MO file

Method Details

__construct() public méthode

Constructor
public __construct ( string $file = '' ) : object
$file string path to GNU MO file
Résultat object File_Gettext_MO

_read() public méthode

_read
public _read ( integer $bytes = 1 ) : mixed
$bytes integer
Résultat mixed

_readInt() public méthode

_readInt
public _readInt ( boolean $bigendian = false ) : integer
$bigendian boolean
Résultat integer

_readStr() public méthode

_readStr
public _readStr ( array $params ) : string
$params array associative array with offset and length of the string
Résultat string

_write() public méthode

_write
public _write ( string $data ) : integer
$data string
Résultat integer

_writeInt() public méthode

_writeInt
public _writeInt ( integer $int ) : integer
$int integer
Résultat integer

_writeStr() public méthode

_writeStr
public _writeStr ( string $string ) : integer
$string string
Résultat integer

load() public méthode

Load MO file
public load ( string $file = null ) : mixed
$file string
Résultat mixed Returns true on success or PEAR_Error on failure.

save() public méthode

Save MO file
public save ( string $file = null ) : mixed
$file string
Résultat mixed Returns true on success or PEAR_Error on failure.

Property Details

$_handle protected_oe property

file handle
protected resource $_handle
Résultat resource

$writeBigEndian protected_oe property

Whether to write with big endian byte order.
protected bool $writeBigEndian
Résultat boolean