Sets the name to use in PHP sources.

It will generate a phpName from its name if no
$phpName is passed.

@param string $phpName
350816
public function setPhpName($phpName = null)
    {
        if (null === $phpName) {
            $this->phpName = self::generatePhpName($this->name, $this->phpNamingMethod, $this->namePrefix);
        } else {
            $this->phpName = $phpName;
        }
    }
1221491
protected function setNameAttribute($name)
    {
        if( ! isset($this->settings['attr']['name']) && ! empty($name) )
        {
            $this->settings['attr']['name'] = $name;
        }
    }
1338670
public function setName(string $name) : void
    {
        $data = (object)[
            'threadNameDetail' => (object)[
                'threadName' => $name
            ]
        ];

        $this->putJson(sprintf(self::MESSAGE_THREAD_ENDPOINT . 'threads/%s/name', $this->messageThreadId), $data);
    }
766521
private function setName($name)
    {
        $name       = trim(strip_tags($name));
        $this->name = str_replace([' '], '-', $name);

        return $this;
    }
114449
public function setName($name)
  {
    if (ThrottlerHelper::validateName($name) && !$this->isActive()) {
      $this->name = $name;
      return true;
    }
    return false;
  }
1163084
protected function fillUsername(string $username): void
    {
        $this->context->findElement($this->fields['username'], $this->defaultTimeout)->setValue($username);
    }
629777
public function setName(string $name) : void
    {
        if (empty($name)) {
            throw new InvalidArgumentException('Empty field name is not allowed');
        }

        $this->_name = $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);
    }
276432
public function setFileName($fileName = null) {
		if (empty($fileName)) {
			return false;
		}

		$this->_fileName = (string)$fileName;

		return true;
	}
1121958
public function setName($name)
    {
      if(!is_string($name) || strlen(trim($name)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid name, must be a non empty string');

      $this->name = $name;
    }
383328
public function setFromName($fieldName)
    {
        if (empty($this->name)) {
            $this->name = $fieldName;
        }
        $this->attrName = $this->getAttrName();
        $this->concrete = false === empty($this->getColumnName());

        if (empty($this->verboseName)) {
            $this->verboseName = ucwords(
                str_replace(
                    '_',
                    ' ',
                    $this->name
                )
            );
        }
    }
659281
public function setName($name)
    {
        $nameParts = explode(' ', $name);
        $this->Surname = array_pop($nameParts);
        $this->FirstName = join(' ', $nameParts);
    }
1123982
public function setUsername($username)
    {
        if (mb_strlen($username) == 0) {
            $this->throwError('Username not set');
        }

        $this->username = $username;

        return $this;
    }
1358586
public function setName($sName)
    {
        if (!empty($sName)) {
            if (!is_numeric($sName)) {
                @session_name($sName);
            } else {
                throw new Exception('The session name can\'t consist only of digits, '
                .'at least one letter must be presented.');
            }
        } else {
            throw new Exception('Empty session name value was passed.');
        }
    }
741702
public function setName($name) {
        if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name));
        if (!strlen($name))    throw new InvalidArgumentException('Invalid argument $name: '.$name);

        $this->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;
    }
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;
    }