public function factory($name, $definition)
    {
        if (!is_string($definition) && !$definition instanceof Closure) {
            throw new BoxException("Error `{$name}` is not a closure definition dependency can't use it as a factory definition.");
        }
        $this->_set($name, $definition, 'factory');
    }