public function name($name = null)
    {
        if ($name !== null) {
            if (preg_match("/[=,; \t\r\n\013\014]/", $name)) {
                throw new \InvalidArgumentException(sprintf('Cookie name "%s" contains invalid characters', $name));
            }

            if (empty($name)) {
                throw new \InvalidArgumentException('Cookie name cannot be empty');
            }

            $this->name = $name;
        }

        return $this->name;
    }
public function name($name = null)
    {
        if ($name !== null) {
            if (preg_match("/[=,; \t\r\n\013\014]/", $name)) {
                throw new \InvalidArgumentException(sprintf('Cookie name "%s" contains invalid characters', $name));
            }

            if (empty($name)) {
                throw new \InvalidArgumentException('Cookie name cannot be empty');
            }

            $this->name = $name;
        }

        return $this->name;
    }
public function name ( $ name = null ) { if ( $ name !== null ) { if ( preg_match ( "/[=,; \t\r\n\013\014]/" , $ name ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Cookie name "%s" contains invalid characters' , $ name ) ) ; } if ( empty ( $ name ) ) { throw new \ InvalidArgumentException ( 'Cookie name cannot be empty' ) ; } $ this -> name = $ name ; } return $ this -> name ; }
Returns cookie name

@param string $name

@return string
Returns cookie name