public function getEntity($className, $id)
    {
        if (isset($this->entities[$className]) && isset($this->entities[$className][$id])) {
            return $this->entities[$className][$id];
        }

        if (isset($this->stashedEntities[$className]) && isset($this->stashedEntities[$className][$id])) {
            return $this->stashedEntities[$className][$id];
        }

        return null;
    }
public function getEntity($className, $id)
    {
        if (isset($this->entities[$className]) && isset($this->entities[$className][$id])) {
            return $this->entities[$className][$id];
        }

        if (isset($this->stashedEntities[$className]) && isset($this->stashedEntities[$className][$id])) {
            return $this->stashedEntities[$className][$id];
        }

        return null;
    }
public function getEntity ( $ className , $ id ) { if ( isset ( $ this -> entities [ $ className ] ) && isset ( $ this -> entities [ $ className ] [ $ id ] ) ) { return $ this -> entities [ $ className ] [ $ id ] ; } if ( isset ( $ this -> stashedEntities [ $ className ] ) && isset ( $ this -> stashedEntities [ $ className ] [ $ id ] ) ) { return $ this -> stashedEntities [ $ className ] [ $ id ] ; } return null ; }
Attempts to get a registered entity

@param   string     $className The name of the class the entity belongs to
@param   int|string $id        The entity's Id

@return  object|null  The entity if it was found, otherwise null
Attempts to get a registered entity