src/Application.php
public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER)
    {
        if (!$this->booted) {
            $this->boot();
        }

        $this->container->set($id, $service, $scope);
    }
public function set($id, $service, $scope = ContainerInterface::SCOPE_CONTAINER)
    {
        if (!$this->booted) {
            $this->boot();
        }

        $this->container->set($id, $service, $scope);
    }
Sets a service within the service container.

@param string          $id      The service identifier
@param object|callable $service The service instance
@param string          $scope   The scope of the service