You are here

public static function Reader::resolveFourByteLittleEndian in Drupal 7

Parameters

string $content:

int $start:

Return value

int

2 calls to Reader::resolveFourByteLittleEndian()
Manifest::fromContent in misc/typo3/phar-stream-wrapper/src/Phar/Manifest.php
Reader::resolveManifestLength in misc/typo3/phar-stream-wrapper/src/Phar/Reader.php

File

misc/typo3/phar-stream-wrapper/src/Phar/Reader.php, line 210

Class

Reader

Namespace

TYPO3\PharStreamWrapper\Phar

Code

public static function resolveFourByteLittleEndian($content, $start) {
  $payload = substr($content, $start, 4);
  if (!is_string($payload)) {
    throw new ReaderException(sprintf('Cannot resolve value at offset %d', $start), 1539614260);
  }
  $value = unpack('V', $payload);
  if (!isset($value[1])) {
    throw new ReaderException(sprintf('Cannot resolve value at offset %d', $start), 1539614261);
  }
  return $value[1];
}