src/Service/Flow/Recursion.php
public function isInHive($bee)
    {
        // Check objects.
        if (is_object($bee) === true) {
            return $this->recursionHive->contains($bee);
        }

        // Check arrays (only the $GLOBAL array may apply).
        if (isset($bee[$this->recursionMarker]) === true) {
            // We render the $GLOBALS only once.
            if ($this->globalsWereRendered === true) {
                return true;
            }

            $this->globalsWereRendered = true;
        }

        // Should be a normal array. We do not track these, because we can not
        // resolve them via JS recursion handling.
        return false;
    }
public function isInHive($bee)
    {
        // Check objects.
        if (is_object($bee) === true) {
            return $this->recursionHive->contains($bee);
        }

        // Check arrays (only the $GLOBAL array may apply).
        if (isset($bee[$this->recursionMarker]) === true) {
            // We render the $GLOBALS only once.
            if ($this->globalsWereRendered === true) {
                return true;
            }

            $this->globalsWereRendered = true;
        }

        // Should be a normal array. We do not track these, because we can not
        // resolve them via JS recursion handling.
        return false;
    }
public function isInHive ( $ bee ) { // Check objects. if ( is_object ( $ bee ) === true ) { return $ this -> recursionHive -> contains ( $ bee ) ; } // Check arrays (only the $GLOBAL array may apply). if ( isset ( $ bee [ $ this -> recursionMarker ] ) === true ) { // We render the $GLOBALS only once. if ( $ this -> globalsWereRendered === true ) { return true ; } $ this -> globalsWereRendered = true ; } // Should be a normal array. We do not track these, because we can not // resolve them via JS recursion handling. return false ; }
Find out if our bee is already in the hive.

@param object|array $bee
The object or array we want to check for recursion.

@return bool
Boolean which shows whether we are facing a recursion.
Find out if our bee is already in the hive .