You are here

protected function MongodbMenuTreeStorage::doEncode128 in MongoDB 8

Parameters

$number:

Return value

string

1 call to MongodbMenuTreeStorage::doEncode128()
MongodbMenuTreeStorage::encode128 in src/MongodbMenuTreeStorage.php

File

src/MongodbMenuTreeStorage.php, line 205
Contains \Drupal\mongodb\MongodbMenuTreeStorage .

Class

MongodbMenuTreeStorage

Namespace

Drupal\mongodb

Code

protected function doEncode128($number) {
  $encoded = '';
  while ($number) {
    $encoded = chr($number & 0x7f) . $encoded;
    $number = $number >> 7;
  }
  return $encoded;
}