code/libraries/joomlatools/library/http/cookie/cookie.php
public function setName($name)
    {
        //Check for invalid cookie name (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));
        }

        //Check for empty cookie name
        if (empty($name)) {
            throw new InvalidArgumentException('The cookie name cannot be empty.');
        }

        $this->_name = $name;
        return $this;
    }
public function setName($name)
    {
        //Check for invalid cookie name (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));
        }

        //Check for empty cookie name
        if (empty($name)) {
            throw new InvalidArgumentException('The cookie name cannot be empty.');
        }

        $this->_name = $name;
        return $this;
    }
public function setName ( $ name ) { //Check for invalid cookie name (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 ) ) ; } //Check for empty cookie name if ( empty ( $ name ) ) { throw new InvalidArgumentException ( 'The cookie name cannot be empty.' ) ; } $ this -> _name = $ name ; return $ this ; }
Set the cookie name

@param string $name The name of the cookie
@throws \InvalidArgumentException    If the cookie name is not valid or is empty
@return KHttpCookie
Set the cookie name