Set the name of the variable.

@param string $name The name of the variable without the leading dollar sign ('$').
@throws InvalidArgumentException If $name is not a string value.
16732
public function setName($name)
    {
        if (is_string($name) === false) {
            $msg = "The 'name' argument must be a string value, '" . gettype($name) . "' given.";
            throw new InvalidArgumentException($msg);
        }

        $this->name = $name;
    }
738195
public function setLabel( $name )
	{
		if ( $name == $this->getLabel() ) { return; }

		$this->_values['label'] = (string) $name;
		$this->_modified = true;
	}
1232660
public function setLabel( $name )
	{
		if ( $name == $this->getLabel() ) { return; }

		$this->_values['label'] = (string) $name;
		$this->setModified();
	}
879887
public function setName($name)
    {
        if (strpos(self::PATH_SEPARATOR, $name) !== false) {
            throw new \InvalidArgumentException(
                'Invalid character "' . self::PATH_SEPARATOR . '" in resource name.'
            );
        }

        $this->name = $name;
    }
96388
public function setName($name)
	{
		if ( ! is_string($name))
		{
			throw new \InvalidArgumentException('The name must be a string');
		}

		Arr::set($this->attributes, 'name', $name);

		return $this;
	}
786347
public function offsetSet($name, $value)
    {
        if (is_null($name)) {
            throw new \InvalidArgumentException('The key name cannot be null.');
        }

        $this->set($name, $value);
    }
483965
public function setName($name)
    {
        if (is_scalar($name) || method_exists($name, '__toString')) {
            $this->name = (string) $name;
        } else {
            throw new InvalidArgumentException('The name must be a string.');
        }

        if ($this->name === '') {
            $this->name = 'Error';
        }

        return $this;
    }
1064227
public function setAttribute($name)
    {
        if (!$this->isValidAttribute($name)) {
            throw new exception\InvalidArgumentException(sprintf(
                'Invalid attribute name "%s"', $name
            ));
        }

        $this->attribute = $name;
        return $this;
    }
1344696
public function setName($name)
    {
        if (in_array($name, MathFunctions::asArray())) {
            $this->name = $name;
        } else {
            $msg = "The name attribute must be a value from the MathFunctions enumeration, '" . $name . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
593415
public function setName($name)
	{
		if ( ! is_string($name)) {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one, name, to be a string"
			);	
		}
		
		if ( ! is_readable($name)) {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one, name, to be a readable filename"
			);
		}
		
		$this->name = $name;
		
		return $this;
	}
472745
public function setName(string $name) : self
    {
        // from PHP source code
        if (preg_match("/[=,; \t\r\n\013\014]/", $name)) {
            throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name));
        }

        if (empty($name)) {
            throw new \InvalidArgumentException('The cookie name cannot be empty.');
        }

        $this->name = $name;

        return $this;
    }
181781
public function setName($name)
    {
        $this->name = $name;

        if ($this->id === null) {
            $this->id = $name;
        }
    }
983361
public function setName($name): void
    {
        if ($this->sessionExists()) {
            throw new SessionException(
                'Cannot set session name after a session has already started'
            );
        }

        if (!preg_match('/^[a-zA-Z0-9]+$/', $name)) {
            throw new SessionException(
                'Name provided contains invalid characters; must be alphanumeric only'
            );
        }

        $this->name = $name;
        session_name($name);
    }
844531
public function setName($name)
    {
        if ((strlen($name) > 50)) {
            throw new \InvalidArgumentException('invalid length for $name when calling PostCharactersCharacterIdFittingsFitting., must be smaller than or equal to 50.');
        }
        if ((strlen($name) < 1)) {
            throw new \InvalidArgumentException('invalid length for $name when calling PostCharactersCharacterIdFittingsFitting., must be bigger than or equal to 1.');
        }

        $this->container['name'] = $name;

        return $this;
    }
1277039
public function setUsername($username)
    {
        if (preg_match(self::PATTERN_MATCH_USERNAME, $username) !== 1) {
            throw new \InvalidArgumentException('"' . $username . '" is not a valid username.', 1184071238);
        }

        $this->username = $username;
    }
1156440
public function setName($name = null)
    {
        if ($name) {
            if (is_object($name) && get_class($name) == 'HumanNameParser_Name') { // this is mostly for testing
                $this->name = $name;
            } else {
                $this->name = new Name($name);
            }

            $this->leadingInit = '';
            $this->first = '';
            $this->nicknames = '';
            $this->middle = '';
            $this->last = '';
            $this->suffix = '';

            $this->suffixes = ['esq', 'esquire', 'jr', 'sr', '2', 'ii', 'iii', 'iv'];
            $this->prefixes = [
                'bar', 'ben', 'bin', 'da', 'dal', 'de la', 'de', 'del', 'der', 'di',
                'ibn', 'la', 'le', 'san', 'st', 'ste', 'van', 'van der', 'van den', 'vel', 'von',
            ];

            $this->parse();
        }
    }
70250
public function setDriver($name)
    {
        $class = '\\Samurai\\Onikiri\\Driver\\' . ucfirst($name) . 'Driver';
        if (! class_exists($class)) throw new \InvalidArgumentException("No such driver. -> {$name}");
        
        $driver = new $class();
        $this->driver = $driver;
    }