public function setClassName($name, $class_name, $shared = true) {
		if (substr($name, -1) === '_') {
			throw new InvalidArgumentException('$name cannot end with "_"');
		}
		$classname_pattern = self::CLASS_NAME_PATTERN_53;
		if (!is_string($class_name) || !preg_match($classname_pattern, $class_name)) {
			throw new InvalidArgumentException('Class names must be valid PHP class names');
		}
		$func = function () use ($class_name) {
			return new $class_name();
		};
		return $this->setFactory($name, $func, $shared);
	}