You are here

private function Context::addArray in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/sebastian/recursion-context/src/Context.php \SebastianBergmann\RecursionContext\Context::addArray()

Parameters

array $array:

Return value

bool|int

1 call to Context::addArray()
Context::add in vendor/sebastian/recursion-context/src/Context.php
Adds a value to the context.

File

vendor/sebastian/recursion-context/src/Context.php, line 91

Class

Context
A context containing previously processed arrays and objects when recursively processing a value.

Namespace

SebastianBergmann\RecursionContext

Code

private function addArray(array &$array) {
  $key = $this
    ->containsArray($array);
  if ($key !== false) {
    return $key;
  }
  $this->arrays[] =& $array;
  return count($this->arrays) - 1;
}