public function setName($name)
	{
		// Check if we need to make this an array
		$endsWithBrackets = substr_compare($name, '[]', -2, 2) === 0;
		if ($this->isAutoArray() && ! $endsWithBrackets)
		{
			$name .= '[]';
		}

		$this->itSetName($name);

		// For any children, update the name
		foreach ($this->getContents() as $item)
		{
			$item->setName($this->getName());
		}

		return $this;
	}
public function setName($name)
	{
		// Check if we need to make this an array
		$endsWithBrackets = substr_compare($name, '[]', -2, 2) === 0;
		if ($this->isAutoArray() && ! $endsWithBrackets)
		{
			$name .= '[]';
		}

		$this->itSetName($name);

		// For any children, update the name
		foreach ($this->getContents() as $item)
		{
			$item->setName($this->getName());
		}

		return $this;
	}
public function setName ( $ name ) { // Check if we need to make this an array $ endsWithBrackets = substr_compare ( $ name , '[]' , - 2 , 2 ) === 0 ; if ( $ this -> isAutoArray ( ) && ! $ endsWithBrackets ) { $ name .= '[]' ; } $ this -> itSetName ( $ name ) ; // For any children, update the name foreach ( $ this -> getContents ( ) as $ item ) { $ item -> setName ( $ this -> getName ( ) ) ; } return $ this ; }
Sets the name of this group. Any children added will have their name updated to match, as they are in the same
group.

@param string $name

@return $this

@since 2.0
Sets the name of this group . Any children added will have their name updated to match as they are in the same group .