@todo this does not work correctly in BuildTaskRegistry

@param string $name

@return Xinc::Core::Task::TaskInterface - the deleted task

@throws Xinc\Core\Registry\Exception
176569
public function unregister($name)
    {
        $task = $parent::unregister($name);
        foreach ($this->slot[$task->getPluginSlot()] as $i => $check) {
            if ($check === $task) {
                unset($this->slot[$task->getPluginSlot()][$i]);
            }
        }

        return $task;
    }
1071798
public function task($name, $task = null, $description = null)
    {
        return $this->add($task, $name, $description)->getTask();
    }
137
protected function createComponent($name): ?IComponent
    {
        $method = 'createComponent'.ucfirst($name);
        if (method_exists($this, $method)) {
            $this->checkRequirements(self::getReflection()->getMethod($method));
        }

        return parent::createComponent($name);
    }
964738
public function getService($name)
    {
        if (array_key_exists($name, $this->services)) {
            return $this->services[$name];
        } elseif (isset($this->serviceProviders[$name]) && $this->serviceProviders[$name] instanceof ServiceProviderInterface) {
            $service = $this->serviceProviders[$name]->instantiate();
            if (!empty($this->serviceConfiguration[$name]['persistent'])) {
                $this->setService($name, $service);
            }
            return $service;
        } else {
            throw new Exception("Requested service {$name} is not registered");
        }
    }
285404
private function getRecursive(string $name) {
        if ($name === self::SELF_NAME) {
            return $this;
        }
        if (!isset($this->services[$name])) {
            if (in_array($name, $this->usedNames)) {
                throw new Exception("Cyclic dependency found while resolving $name");
            }
            $this->usedNames[] = $name;
            if (!isset($this->initializers[$name])) {
                throw new Exception("No initializer for $name");
            }
            $this->services[$name] = $this->produceRecursive($this->initializers[$name]);
        }
        return $this->services[$name];
    }
1370588
public function resolve($name)
        {
            if (!isset(self::$resources[$name])) {
                throw new Exception("[$name] is not a known resource.");
            }

            return isAke(self::$resources, $name);
        }
361111
public function getService($name)
    {
        try {
            if (!$this->isRegisteredService($name)) {
                $this->registerService($name);
            }
            return $this->di->get($name);
        } catch (\Phalcon\DI\Exception $ex) {
            throw new Exception($ex->getMessage().', using: '.$name);
        }
    }
365328
public function removeBuilder($name)
    {
        unset(
            $this->builderMustExist($name)->builders[$name],
            $this->post_configurations[$name]
        );

        return $this;
    }
114084
public function getPathReducer($name): PathReducerInterface
    {
        if (isset($this->pathReducers[$name])) {
            return $this->pathReducers[$name];
        }

        throw new Exception(sprintf('Path reducer %s does not exist.', $name));
    }
630564
public function getTemplate($name)
    {
        dump($name);
        $templateName = $this->loader->getTemplate($name);
        try {
            $template = $this->environment->loadTemplate($templateName);
        } catch (\Twig_Error_Loader $e) {
            throw $e;
        }

        return $template;
    }
1335696
protected function IblockTypeDelete($name)
    {
        $return = [];
        $name = trim($name);
        if (empty($name)) {
            throw new Exception('You must set iblock type ID');
        }
        if (CIBlockType::Delete($name)) {
            $return[] = "Delete {$name} iblock type";
        } else {
            throw new Exception("Can't delete {$name} iblock type");
        }

        return $return;
    }
73043
protected function instance($name)
    {
        $methodName = $this->methodName($name);

        return $this->objectBuild($name, $methodName);
    }
24701
public function resolveCallback($name)
    {
        if ( !is_callable( $callback = parent::resolveCallback( $name ) ) ) {
            if ( !class_exists( $name ) || !in_array( Middleware::class, class_implements( $name ) ) ) {
                throw new \Exception( $name . ' is not a valid middleware class' );
            }
            $callback = [ $this->container->get( $name ), 'execute' ];
        }
        return $callback;
    }
473539
protected function createComponent($name)
    {
        $result = null;

        $config = $this->getComponentConfig($name);

        if ($config !== null && isset($config['class'])) {
            $result = new $config['class'];
            if (!($result instanceof \pwf\basic\interfaces\Component)) {
                throw new \Exception('Component must implement \'Component\' interface',
                500);
            }
            $result->loadConfiguration($config);
        }

        return $result;
    }
514225
public function get($name)
    {
        if (isset($this->instances[$name])) {
            return $this->instances[$name];
        }
        if (! isset($this->registry[$name])) {
            $exceptionClass = static::NOT_FOUND_EXCEPTION;
            throw new $exceptionClass(
                sprintf(static::NOT_FOUND_MESSAGE, $name)
            );
        }
        try {
            $this->instances[$name] = $this->build($this->registry[$name], $name);
        } catch (Exception $e) {
            throw new RuntimeException(
                sprintf(static::BUILD_FAILURE_MESSAGE, $name),
                null,
                $e
            );
        }

        return $this->instances[$name];
    }
134054
public function unregister($name)
    {
        if (!isset($this->registry[$name])) {
            throw new Exception('Object with name "'.$name.'" is not registered');
        }

        $object = $this->registry[$name];
        unset($this->registry[$name]);

        return $object;
    }
729840
public function of(string $name, callable $callback = null): BuilderContract
    {
        if (! isset($this->names[$name])) {
            $this->names[$name] = $this->make($callback);
            $this->names[$name]->name = $name;
        }

        return $this->names[$name];
    }