public function registration()
    {
        /**
         * @var Config $settings
         */
        if ($this->getDI() === null) {
            throw new DiNotFoundException("DI can't be found.");
        }

        $creator = new Creator($this->di);

        foreach ($this->services as $name => $settings) {
            $creator->setService($settings);
            $service = $creator->injection();

            if ($service !== null) {
                $call = $settings->get('shared') ? 'setShared' : 'set';
                $this->getDI()->$call($name, $service);
            }
        }
        $this->services = null;
    }