Forráskód Böngészése

[php] Add externs for `html_entity_decode`, `htmlentities` and `strip_tags` (#9908)

Cédric Belin 4 éve
szülő
commit
450ae6608e
1 módosított fájl, 16 hozzáadás és 1 törlés
  1. 16 1
      std/php/Global.hx

+ 16 - 1
std/php/Global.hx

@@ -968,13 +968,23 @@ extern class Global {
 	static function setcookie(name:String, value:String = "", expire:Int = 0, path:String = "", domain:String = "",
 		secure:Bool = false, httponly:Bool = false):Bool;
 
+	/**
+		@see http://php.net/manual/en/function.html-entity-decode.php
+	**/
+	static function html_entity_decode(string:String, ?flags:Int, ?encoding:String):String;
+
+	/**
+		@see http://php.net/manual/en/function.htmlentities.php
+	**/
+	static function htmlentities(string:String, ?flags:Int, ?encoding:String, double_encode:Bool = true):String;
+
 	/**
 		@see http://php.net/manual/en/function.htmlspecialchars.php
 	**/
 	static function htmlspecialchars(string:String, ?flags:Int, ?encoding:String, double_encode:Bool = true):String;
 
 	/**
-		@see http://php.net/manual/en/function.htmlspecialchars_decode.php
+		@see http://php.net/manual/en/function.htmlspecialchars-decode.php
 	**/
 	static function htmlspecialchars_decode(string:String, ?flags:Int):String;
 
@@ -1687,4 +1697,9 @@ extern class Global {
 		@see http://php.net/manual/en/function.ob-start.php
 	**/
 	static function ob_start(output_callback: (String, ?Int) -> String = null, chunk_size:Int = 0, ?flags:Int):Bool;
+
+	/**
+		@see http://php.net/manual/en/function.strip-tags.php
+	**/
+	static function strip_tags(str: String, ?allowable_tags:EitherType<String, Array<String>>):String;
 }