public function setClass($id, $class)
    {
        $this->classes[$id] = $class;
        if (isset($this->items[$id])) {
            unset($this->items[$id]);
        }
        $this->allCreated = false;
        return $this;
    }