src/Browser/BrowserCookieTrait.php
public function setCookie($cookie) {
    //TODO: add error control when the cookie array is not valid
    if (isset($cookie["expires"])) {
      $cookie["expires"] = intval($cookie["expires"]) * 1000;
    }
    $cookie['value'] = urlencode($cookie['value']);
    return $this->command('set_cookie', $cookie);
  }
public function setCookie($cookie) {
    //TODO: add error control when the cookie array is not valid
    if (isset($cookie["expires"])) {
      $cookie["expires"] = intval($cookie["expires"]) * 1000;
    }
    $cookie['value'] = urlencode($cookie['value']);
    return $this->command('set_cookie', $cookie);
  }
Sets a cookie on the browser, expires times is set in seconds
@param $cookie
@return mixed