You are here

private function MoFileLoader::readLong in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/translation/Loader/MoFileLoader.php \Symfony\Component\Translation\Loader\MoFileLoader::readLong()

Reads an unsigned long from stream respecting endianess.

Parameters

resource $stream:

bool $isBigEndian:

Return value

int

1 call to MoFileLoader::readLong()
MoFileLoader::parse in vendor/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

vendor/symfony/translation/Loader/MoFileLoader.php, line 184

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);
}