public function dependsOn($className)
    {
        // store last created temporary dependency
        if ($this->currentDependency) {
            $this->flush();
        }

        /* @var $this->currentDependency Doozr_Di_Dependency */
        $this->currentDependency = clone $this->dependency;

        $this->currentDependency->setClassName($className);

        return $this;
    }