You are here

private function MoFileLoader::readLong in Plug 7

Reads an unsigned long from stream respecting endianess.

Parameters

resource $stream:

bool $isBigEndian:

Return value

int

1 call to MoFileLoader::readLong()
MoFileLoader::loadResource in lib/Symfony/translation/Loader/MoFileLoader.php
Parses machine object (MO) format, independent of the machine's endian it was created on. Both 32bit and 64bit systems are supported.

File

lib/Symfony/translation/Loader/MoFileLoader.php, line 147

Class

MoFileLoader
@copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/)

Namespace

Symfony\Component\Translation\Loader

Code

private function readLong($stream, $isBigEndian) {
  $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4));
  $result = current($result);
  return (int) substr($result, -8);
}