Prechádzať zdrojové kódy

[php] Add externs for `header_remove()`, `headers_list()` and `headers_sent()` (#9860)

* [php] Add externs for `header_remove()`, `headers_list()` and `headers_sent()`

* Fix the typings
Cédric Belin 5 rokov pred
rodič
commit
e1659870fd
1 zmenil súbory, kde vykonal 15 pridanie a 0 odobranie
  1. 15 0
      std/php/Global.hx

+ 15 - 0
std/php/Global.hx

@@ -931,6 +931,21 @@ extern class Global {
 	**/
 	static function header(string:String, replace:Bool = true, ?http_response_code:Int):Void;
 
+	/**
+		@see http://php.net/manual/en/function.header-remove.php
+	**/
+	static function header_remove(?name:String):Void;
+
+	/**
+		@see http://php.net/manual/en/function.headers-list.php
+	**/
+	static function headers_list():NativeIndexedArray<String>;
+
+	/**
+		@see http://php.net/manual/en/function.headers-sent.php
+	**/
+	static function headers_sent(?file:Ref<String>, ?line:Ref<Int>):Bool;
+
 	/**
 		@see http://php.net/manual/en/function.setcookie.php
 	**/