public function addCookie($name, $value, $path, $domain, $httpOnly = true, $secure = false, $expires = null)
    {
        $filter = function ($value) {
            return !is_null($value);
        };

        $this->cookies['add'][] = array_filter(array(
            'name'     => $name,
            'value'    => $value,
            'path'     => $path,
            'domain'   => $domain,
            'httponly' => $httpOnly,
            'secure'   => $secure,
            'expires'  => $expires
        ), $filter);

        return $this;
    }