Set the name of the entity.

@param string $name The name to set.
@return \Wingu\OctopusCore\CodeGenerator\PHP\AbstractEntityGenerator
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the name is invalid.
336495
public function setName($name)
    {
        if ($this->isNameValid($name) !== true) {
            throw new InvalidArgumentException('The name is not valid.');
        }

        $this->name = $name;

        return $this;
    }
665433
public function setName(string $name): AbstractSuggest
    {
        if (empty($name)) {
            throw new InvalidException('Suggest name has to be set');
        }
        $this->_name = $name;

        return $this;
    }
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;
    }
792462
public function setEosTokenName(string $name) : BasicLexer
    {
        if (strlen($name) == 0) {
            throw new \InvalidArgumentException('The name of the EOS token must be not empty.');
        }

        $this->eosTokenName = $name;

        return $this;
    }
1002769
public function setName($name) {
    if (is_string($name)) {
      $name = Token::identifier($name);
    }
    $this->name->replaceWith($name);
    return $this;
  }
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;
  }
1176102
public function setQualifiedName($name)
    {
        if (false !== $pos = strrpos($name, '\\')) {
            $this->namespace = substr($name, 0, $pos);
            $this->name = substr($name, $pos + 1);

            return $this;
        }

        $this->namespace = null;
        $this->name = $name;

        return $this;
    }
629777
public function setName(string $name) : void
    {
        if (empty($name)) {
            throw new InvalidArgumentException('Empty field name is not allowed');
        }

        $this->_name = $name;
    }
1324754
public function setName($name)
    {
        $name = trim($name);

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

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

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

        return $this;
    }
365397
public function setEntityClassName($name)
    {
        $trimmedName = trim($name, '\\');

        if (!class_exists($trimmedName)) {
            throw new RuntimeException(sprintf('The class "%s" does not exist.', $trimmedName));
        }

        $this->entityClassName = $trimmedName;

        return $this;
    }
751602
public function setName(string $name) : Application
    {
        $service = $this->getService();
        $service->setName($name);
        $this->name = $service->getName();
        return $this;
    }
453813
public function setName($name)
	{
		$this->_name = $name;
		$this->setPath('template', $this->_basePath . '/views/' . $this->getName() . '/tmpl');

		return $this;
	}
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;
    }
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);
        }
    }
1167060
public function setName($name)
  {
    $allowedValues = $this->getNameAllowableValues();
    if (!is_null($name) && !in_array($name, $allowedValues)) {
      throw new \InvalidArgumentException(
        sprintf(
          "Invalid value for 'name', must be one of '%s'",
          implode("', '", $allowedValues)
        )
      );
    }
    $this->container['name'] = $name;

    return $this;
  }
416859
public function setName($name)
    {
        if (!is_string($name) || (strlen($name) <= 0)) {
            $explodedNamespace = explode('\\', get_class($this));
            $class = $explodedNamespace[count($explodedNamespace) - 1];
            $asset = strtolower(preg_replace('/(.)([A-Z])/', '\\1 \\2', $class));

            throw SchemaException::invalidAssetName($asset);
        }

        $this->name = $name;
    }