public function setCookie($name, $value)
	{
		if(!preg_match("'^[a-z_0-9\-\.]+$'i", $name))
		{
			throw new \InvalidArgumentException(sprintf('Invalid cookie name: "%s"', $name));
		}
			
		$this->cookies[$name] = $value;
		
		return $this;
	}
public function setCookie($name, $value)
	{
		if(!preg_match("'^[a-z_0-9\-\.]+$'i", $name))
		{
			throw new \InvalidArgumentException(sprintf('Invalid cookie name: "%s"', $name));
		}
			
		$this->cookies[$name] = $value;
		
		return $this;
	}
public function setCookie ( $ name , $ value ) { if ( ! preg_match ( "'^[a-z_0-9\-\.]+$'i" , $ name ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid cookie name: "%s"' , $ name ) ) ; } $ this -> cookies [ $ name ] = $ value ; return $ this ; }
Set a cookie value in the request.

@param string $name
@param mixed $value
@return HttpRequest

@throws \InvalidArgumentException When an invalid cookie name is passed.
Set a cookie value in the request .