protected function invokeConfigurator($configurator)
	{
		if (is_callable($configurator)) {
			call_user_func($configurator, $this);
			return;
		}

		if (is_string($configurator)) {
			$configurator = $this->container->resolve($configurator);
		}

		if ($configurator instanceof ConfiguratorInterface) {
			$configurator->configure();
		} else {
			throw new \UnexpectedValueException('Invalid configurator');
		}
	}