code: public static function set($name, $value, $expire = 0, $path = null)
      {
          if ($path === null) {
              setcookie($name, $value, $expire);
          } else {
              setcookie($name, $value, $expire, $path);
          }
      }
docs: Set a cookie.
  
  @static
  @param string $name   key
  @param string $value  new value
  @param int    $expire expiration timestamp
  @param string $path   cookie path