Set the class name to use for the user.

@param string $className

@return $this
@throws \Parable\Framework\Exception
491686
public function setUserClassName($className)
    {
        try {
            \Parable\DI\Container::create($className);
        } catch (\Exception $e) {
            throw new \Parable\Framework\Exception("Class '{$className}' could not be instantiated.");
        }

        $this->userClassName = $className;
        return $this;
    }
441476
public function getObjectManagerNameByClassName($className)
    {
        $realClass = ClassUtils::getRealClass($className);
        if (false === $this->hasObjectManagerNameByClassName($realClass)) {
            $errMsg = sprintf('Failed to get the manager\'s name for class %s', $realClass);
            throw new Exception\ErrorBuildObjectManagerNameException($errMsg);
        }

        return $this->classNameToObjectManagerName[$realClass];
    }
492661
public function setLastname($lastname)
    {
        if (!is_string($lastname) && !is_null($lastname)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a string');
        }

        $this->lastname = $lastname;

        return $this;
    }
511190
public static function getUserClassName($className)
    {
        if (null === self::$inflector) {
            static::$inflector = new ProxyManagerClassNameInflector('');
        }

        return static::$inflector->getUserClassName($className);
    }
864534
public function setUsername($username)
        {
            if ($this->validateUsername($username) === false) {
                throw new Exception("Username \"$username\" is not a valid HTTP username");
            }

            $oldUsername     = $this->_username;
            $this->_username = $username;

            return $oldUsername;
        }
328516
public function setUserClass(string $classname)
    {
        if (!class_exists($classname) || !is_subclass_of($classname, UserInterface::class))
            throw new DomainException("Invalid user class: $classname");
        $this->user_class = $classname;
        return $this;
    }
872502
public function setLastName($lastName) {
        if (empty($lastName))
            throw new Exception('Lastname must be set and cannot be empty.');

        $this->lastName = trim($lastName);

        return $this;
    }
730176
public function addClass($className){

        $formClass = $this->getClassName();
        if (is_string($formClass)){
            $formClass = explode(" ", $formClass);
        }
        $formClass[] = $className;

        $this->setFormClass($formClass);

        return $this;
    }
518368
public static function set($className, $instance)
    {
        $key = self::getStorageKey($className);

        if (is_null($instance)) {
            unset(self::$instances[$key]);

            return;
        }

        self::$instances[$key] = $instance;

        return;
    }
1228199
public function createToken($className)
    {
        if (!is_subclass_of($className, TokenInterface::class)) {
            $this->throwException(
                "$className is not a valid token sub-class"
            );
        }

        return new $className(
            $this->createCurrentSourceLocation(),
            $this->level,
            str_repeat($this->getIndentStyle(), $this->getIndentWidth())
        );
    }
59044
public function setDefaultRepositoryClassName($className)
    {
        $reflectionClass = new \ReflectionClass($className);

        if ( ! $reflectionClass->implementsInterface('Doctrine\Common\Persistence\ObjectRepository')) {
            throw ORMException::invalidEntityRepository($className);
        }

        $this->_attributes['defaultRepositoryClassName'] = $className;
    }
987091
public function setDefaultRepositoryClassName($className)
    {
        $reflectionClass = new \ReflectionClass($className);

        if (!$reflectionClass->implementsInterface(ObjectRepository::class)) {
            throw PHPCRException::invalidDocumentRepository($className);
        }

        $this->attributes['defaultRepositoryClassName'] = $className;
    }
463980
public final function removeClass(string $className): LoaderInterface
    {
        if (array_key_exists($className, $this->className)) {
            unset($this->className[$className]);
        }
        return $this;
    }
1257868
public function setFormClassName($className) {
        if ($this->configured) throw new IllegalStateException('Configuration is frozen');
        $name = $this->name ? ' name="'.$this->name.'"':'';
        $path = $this->path ? ' path="'.$this->path.'"':'';

        if (!is_subclass_of($className, ACTION_FORM_BASE_CLASS)) throw new StrutsConfigException('<mapping'.$name.$path.' form="'.$className.'": Not a subclass of '.ACTION_FORM_BASE_CLASS.'.');

        $this->formClassName = $className;
        return $this;
    }
1137892
public function setName($name) {
		if (is_array($name) && empty($name)) {
			$this->name = new \stdClass;
		} else {
			$this->name = $name;
		}

		return $this;
	}
516371
protected function createClass(string $className)
    {
        if (!class_exists($className)) {
            throw new class("The class $className does not exists") extends Exception implements
                NotFoundExceptionInterface {
            };
        }

        $reflection = new ReflectionClass($className);

        if ($reflection->hasMethod('__construct')) {
            return $reflection->newInstanceArgs($this->arguments);
        }

        return $reflection->newInstance();
    }
770428
public function setFirstname($firstname)
    {
        if (!is_string($firstname) && !is_null($firstname)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a string');
        }

        $this->firstname = $firstname;

        return $this;
    }