Sets or gets the session name.

@param string $name the session name for the current session

@throws \InvalidArgumentException
@return string the current session name
339253
public function sessionName($name = null)
    {
        if ($name === null) {
            return session_name();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($name)) {
            throw new \InvalidArgumentException('Session name must be null or a string');
        }
        session_name($name);
    }
342647
public function getOption($name) {
    if (!array_key_exists($name, $this->options)) {
      throw new InvalidArgumentException(sprintf('Undefined option: "%s"', $name));
    }

    return $this->options[$name];
  }
628635
protected function prepareHeaderName($name)
    {
        if (! is_string($name)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid header name "%s" provided; must be an string.',
                $name
            ));
        }

        $name = trim($name);

        if (! $name) {
            throw new InvalidArgumentException('Header name is empty.');
        }
        if (! preg_match('/^[a-zA-Z0-9\'\!#$%&\*\+-\.^_`\|~]+$/', $name)) {
            throw new InvalidArgumentException(sprintf(
                'Header name "%s" contains illegal characters.',
                $name
            ));
        }

        return $name;
    }
1107302
public function setDefaultSessionName($name)
    {
        $name = strtolower($name);

        if (!isset($this->sessions[$name])) {
            throw new \InvalidArgumentException(sprintf('Session "%s" is not registered.', $name));
        }

        $this->defaultSessionName = $name;
    }
563117
private function setName($name)
    {
        $this->checkName($name);

        $this->name         = $name;
        $this->singleValued = in_array($name, $this->singles);

        return $this;
    }
696999
public function setName($name)
    {
        $name = Str::cast($name);

        $this->name = $name->lower();

        return $this;
    }
177821
public function name($name)
    {
        if (is_null($name)) {
            throw new \InvalidCookieException('Cookie name cannot be null');

            return false;
        }

        $this->name = (string) $this->security->sanitize($name);

        return $this;
    }
112590
public function getOption($name) {
        if (!$this->definition->hasOption($name)) {
            throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name));
        }

        return isset($this->options[$name]) ? $this->options[$name] : $this->definition->getOption($name)->getDefault();
    }
118969
private static function validateName(string $name) : string
  {
    if (empty($name) || preg_match("/[=,; \t\r\n\013\014]/", $name)) {
      throw new \InvalidArgumentException(sprintf('Invalid name \'%s\'.', $name));
    }

    return $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;
	}
1207557
public function setName($name)
    {
        if (in_array($name, MathEnumeration::asArray())) {
            $this->name = $name;
        } else {
            $msg = "${name} is not a valid QTI Math constant.";
            throw new InvalidArgumentException($msg);
        }
    }
787802
public function getMember($name)
    {
        $members = $this->getMembers();

        if (!isset($members[$name])) {
            throw new \InvalidArgumentException('Unknown member ' . $name);
        }

        return $members[$name];
    }
409580
public function getAdminConnection($name = null)
    {
        if (null === $name) {
            $name = $this->getDefaultConnectionName();
        }

        $serviceName = sprintf('doctrine_phpcr.admin.%s_session', $name);

        $connections = $this->getConnectionNames();
        if (!isset($connections[$name])) {
            throw new \InvalidArgumentException(sprintf('Doctrine %s Connection named "%s" does not exist.', $this->getName(), $name));
        }

        return $this->getService($serviceName);
    }
643661
public function getSessionParameter($name)
    {
        if ($this->sessionParameters->has($name)) {
            return $this->sessionParameters->get($name);
        }
    }
610554
public function getNamer($name)
    {
        if (!isset($this->namers[$name])) {
            throw new \InvalidArgumentException(sprintf('Namer "%s" is not registered.', $name));
        }

        return $this->namers[$name];
    }
56969
protected function setName($name) {
    if (!Preg::match($name, self::PATTERN_NAME)) {
      throw new InvalidArgumentException(sprintf("name can only be of '%s'. '%s' given", self::PATTERN_NAME, $name));
    }
    $this->name = $name;
    return $this;
  }
497700
public function setName($name) {
        $this->name = $name;
        $arg = pathinfo($name, PATHINFO_EXTENSION);
        if (!empty($arg)) {
            $this->extension = $arg;
        }
        return $this;
    }