Kaynağa Gözat

[php] added externs for spl_* functions

Aleksandr Kuzmenko 6 yıl önce
ebeveyn
işleme
b6221e4e78
2 değiştirilmiş dosya ile 48 ekleme ve 0 silme
  1. 8 0
      std/php/Const.hx
  2. 40 0
      std/php/Global.hx

+ 8 - 0
std/php/Const.hx

@@ -32,6 +32,14 @@ extern class Const {
 	static var __TRAIT__ : String;
 	static var __METHOD__ : String;
 	static var __NAMESPACE__ : String;
+	/**
+		@see https://php.net/manual/en/dir.constants.php
+	**/
+	static var DIRECTORY_SEPARATOR : String;
+	static var PATH_SEPARATOR : String;
+	static var SCANDIR_SORT_ASCENDING : Int;
+	static var SCANDIR_SORT_DESCENDING : Int;
+	static var SCANDIR_SORT_NONE : Int;
 	/**
 		@see http://php.net/manual/en/errorfunc.constants.php
 	**/

+ 40 - 0
std/php/Global.hx

@@ -957,6 +957,36 @@ extern class Global {
 	**/
 	static function spl_object_hash( obj:{} ) : String;
 
+	/**
+		@see http://php.net/manual/en/function.spl-autoload-call.php
+	**/
+	static function spl_autoload_call( class_name:String ) : Void;
+
+	/**
+		@see http://php.net/manual/en/function.spl-autoload-extensions.php
+	**/
+	static function spl_autoload_extensions( ?file_extensions:String ) : String;
+
+	/**
+		@see http://php.net/manual/en/function.spl-autoload-functions.php
+	**/
+	static function spl_autoload_functions() : EitherType<NativeIndexedArray<Function>,Bool>;
+
+	/**
+		@see http://php.net/manual/en/function.spl-autoload-register.php
+	**/
+	static function spl_autoload_register( ?autoload_function:(className:String)->Void, throw_exception:Bool = true, prepend:Bool = false ) : Bool;
+
+	/**
+		@see http://php.net/manual/en/function.spl-autoload-unregister.php
+	**/
+	static function spl_autoload_unregister( autoload_function:(className:String)->Void ) : Bool;
+
+	/**
+		@see http://php.net/manual/en/function.spl-autoload.php
+	**/
+	static function spl_autoload( class_name:String, ?file_extensions:String ) : Void;
+
 	/**
 		@see http://php.net/manual/en/function.utf8-encode.php
 	**/
@@ -1375,6 +1405,16 @@ extern class Global {
 	**/
 	static function include_once( include_path:String ) : Void;
 
+	/**
+		@see http://php.net/manual/en/function.set-include-path.php
+	**/
+	static function set_include_path( new_include_path:String ) : String;
+
+	/**
+		@see http://php.net/manual/en/function.get-include-path.php
+	**/
+	static function get_include_path() : String;
+
 	/**
 		@see http://php.net/manual/en/function.gzcompress.php
 	**/