You are here

private function Context::addObject in Zircon Profile 8

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

Parameters

object $object:

Return value

string

1 call to Context::addObject()
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 108

Class

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

Namespace

SebastianBergmann\RecursionContext

Code

private function addObject($object) {
  if (!$this->objects
    ->contains($object)) {
    $this->objects
      ->attach($object);
  }
  return spl_object_hash($object);
}