public function setInstance(Hierarchy $element)
    {
        $class = get_class($element);
        $this->hierarchy[$class][$element->getID()] = $element;
        return $this;
    }
public function setInstance(Hierarchy $element)
    {
        $class = get_class($element);
        $this->hierarchy[$class][$element->getID()] = $element;
        return $this;
    }
public function setInstance ( Hierarchy $ element ) { $ class = get_class ( $ element ) ; $ this -> hierarchy [ $ class ] [ $ element -> getID ( ) ] = $ element ; return $ this ; }
Set the instance of a specific ID.

@param scalar $id The ID to set the instance for
@return $this Provides fluent interface
Set the instance of a specific ID .