Set name

@param string $name
@return Route
@throws \LogicException
198261
public function setName($name)
    {
        if (!is_string($name)) {
            throw new \LogicException(sprintf('Route name given "%s" is invalid. String expected.', gettype($name)));
        }
        $this->name = $name;
        
        return $this;
    }
394370
public function setName($name)
    {
        $attrName = $this->isMultiple()
            ? "{$name}[]"
            : $name;
        $this->setAttribute('name', $attrName);
        $this->name = $name;
        if ($label = $this->getLabel()) {
            $this->getLabel()->setAttribute('for', $this->generateId());
        }
        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;
    }
384861
protected function setUsername($name) {
        if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name));
        if (!strlen($name))    throw new InvalidArgumentException('Invalid parameter $name: "'.$name.'" (empty)');

        $this->username = $name;
        return $this;
    }
312347
public function setNamePrefix($name)
    {
        $this->_namePrefix = $name;
        if ($this->getFilterField()) $this->getFilterField()->setNamePrefix($name);
        if ($this->getFilteredField()) $this->getFilteredField()->setNamePrefix($name);
        return $this;
    }
791015
public function setName( $name )
   {

      if ( $this->_name === $name ) { return $this; }

      $this->_name = $name;

      $this->notify( [ 'property' => 'name' ] );

      return $this;

   }
1197707
protected function setPropertyName($name) {
        if(!empty($name)) {
            $name = $this->getDriverEscaper()->escape($name);
            $name = $this->getDriverEscaper()->quote($name);
            return $this->getDriverEscaper()->reserved('predicate') . ' = ' . $name . ' ' 
                    . $this->getDriverEscaper()->dbCommand('AND') . ' ( ';
        }
        return '';
    }
675300
public function name(string $name){
		$this->name = trim($name);

		if(empty($this->name)){
			throw new QueryException('no name specified');
		}

		return $this;
	}
683823
public function setName($name) {
        if ($this->frozen) throw new RuntimeException('Configuration of "'.get_class($this).'" is frozen');

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

        if ($name === '') {
            $this->aliases = [];                                    // a default command cannot have aliases
        }
        else {
            $this->aliases = array_diff($this->aliases, [$name]);   // remove overlapping aliases
        }
        return $this;
    }
751602
public function setName(string $name) : Application
    {
        $service = $this->getService();
        $service->setName($name);
        $this->name = $service->getName();
        return $this;
    }
720696
public function setName($name)
    {
        if (false !== stripos($name, '.')) {
            $relations = explode('.', $name);
            $name = array_pop($relations);
            $this->relation = implode('.', $relations);
        }

        $this->name = $name;

        return $this;
    }
356516
public function setName($name) {
        // get the path info of the given name
        $pathinfo = pathinfo($name);
        
        // get the base file name
        $filename = $pathinfo['filename'];
        
        // set the file name
        $this->name = $filename . '.' . $this->extension();

        // done, return the instance of this, to make chaining possible
        return $this;
    }
760506
public function set_name($name)
    {
        $previous_name = $this->name;

        $name = self::generateName($name, $this->app['unicode']);

        if ($name === '') {
            throw new \Exception_InvalidArgument();
        }

        $this->name = $name;

        if ($this->name !== $previous_name) {
            $this->renamed = true;
        }

        return $this;
    }
332147
public function setName($name) {
        if ($name !== null && ! $this->argumentsParser->isOptionName($name)) {
            throw new InvalidOptionNameException(s(
                'A option name must have this format: "--option", got: "%s"', $name
            ));
        }

        $this->name = $name;

        return $this;
    }
500681
public function remove(string $name): self
    {
        if (!$this->exists($name)) {
            throw new LogicException(
                'The template function "' . $name . '" was not found.'
            );
        }

        unset($this->helpers[$name]);

        return $this;
    }
1233969
public function setName($name) {
    /** @var TokenNode $identifier */
    $identifier = $this->name->firstChild();
    $identifier->setText($name);
    return $this;
  }
604895
public function setName($name)
    {
        if (!is_string($name) && !is_null($name)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a string');
        }

        $this->name = $name;

        return $this;
    }