Procházet zdrojové kódy

[php] Add externs for the `connection_xxx()` functions and their constants (#10447)

* [php] Add externs for the `CONNECTION_XXX` constants

* [php] Add externs for the `connection_xxx()` functions
Cédric Belin před 3 roky
rodič
revize
f76ea273a4
2 změnil soubory, kde provedl 22 přidání a 0 odebrání
  1. 7 0
      std/php/Const.hx
  2. 15 0
      std/php/Global.hx

+ 7 - 0
std/php/Const.hx

@@ -659,4 +659,11 @@ extern class Const {
 	static final FTP_TEXT: Int;
 	static final FTP_TIMEOUT_SEC: Int;
 	static final FTP_USEPASVADDRESS: Bool;
+
+	/**
+		@see http://php.net/manual/en/misc.constants.php
+	**/
+	static final CONNECTION_ABORTED: Int;
+	static final CONNECTION_NORMAL: Int;
+	static final CONNECTION_TIMEOUT: Int;
 }

+ 15 - 0
std/php/Global.hx

@@ -2083,4 +2083,19 @@ extern class Global {
 		@see http://php.net/manual/en/function.ftp-systype.php
 	**/
 	static function ftp_systype(ftp: Resource): EitherType<String, Bool>;
+
+	/**
+		@see http://php.net/manual/en/function.connection-aborted.php
+	**/
+	static function connection_aborted(): Int;
+
+	/**
+		@see http://php.net/manual/en/function.connection-status.php
+	**/
+	static function connection_status(): Int;
+
+	/**
+		@see http://php.net/manual/en/function.ignore-user-abort.php
+	**/
+	static function ignore_user_abort(enable: Null<Bool> = null): Int;
 }