public function setObject(RenderableInterface $object = null)
    {
        $this->__currentelement = null;
        $this->_object = $object;

        if (is_array($this->__vars) && 0 < count($this->__vars)) {
            foreach ($this->__vars as $key => $var) {
                if ($var === $object) {
                    $this->__currentelement = $key;
                }
            }
        }

        return $this;
    }