public function setName($name, $isEmpty = NULL)
	{
		if ($name !== NULL && !is_string($name)) {
			throw new InvalidArgumentException(sprintf('Name must be string or NULL, %s given.', gettype($name)));
		}

		$this->name = $name;
		$this->isEmpty = $isEmpty === NULL ? isset(static::$emptyElements[$name]) : (bool)$isEmpty;

		return $this;
	}
public function setName($name, $isEmpty = NULL)
	{
		if ($name !== NULL && !is_string($name)) {
			throw new InvalidArgumentException(sprintf('Name must be string or NULL, %s given.', gettype($name)));
		}

		$this->name = $name;
		$this->isEmpty = $isEmpty === NULL ? isset(static::$emptyElements[$name]) : (bool)$isEmpty;

		return $this;
	}
public function setName ( $ name , $ isEmpty = NULL ) { if ( $ name !== NULL && ! is_string ( $ name ) ) { throw new InvalidArgumentException ( sprintf ( 'Name must be string or NULL, %s given.' , gettype ( $ name ) ) ) ; } $ this -> name = $ name ; $ this -> isEmpty = $ isEmpty === NULL ? isset ( static :: $ emptyElements [ $ name ] ) : ( bool ) $ isEmpty ; return $ this ; }
Changes element's name.

@param  string
@param  bool  Is element empty?
@return self
@throws InvalidArgumentException
Changes element s name .