浏览代码

[php] Add externs for `easter_date` / `easter_days` functions and calendar constants (#10341)

* [php] Add externs for `easter_date` and `easter_days` functions

* [php] Add externs for the calendar constants
Cédric Belin 4 年之前
父节点
当前提交
49e6e7a1c2
共有 2 个文件被更改,包括 35 次插入0 次删除
  1. 25 0
      std/php/Const.hx
  2. 10 0
      std/php/Global.hx

+ 25 - 0
std/php/Const.hx

@@ -619,4 +619,29 @@ extern class Const {
 	static final FILEINFO_PRESERVE_ATIME: Int;
 	static final FILEINFO_RAW: Int;
 	static final FILEINFO_SYMLINK: Int;
+
+	/**
+		@see http://php.net/manual/en/calendar.constants.php
+	**/
+	static final CAL_DOW_DAYNO: Int;
+	static final CAL_DOW_LONG: Int;
+	static final CAL_DOW_SHORT: Int;
+	static final CAL_EASTER_ALWAYS_GREGORIAN: Int;
+	static final CAL_EASTER_ALWAYS_JULIAN: Int;
+	static final CAL_EASTER_DEFAULT: Int;
+	static final CAL_EASTER_ROMAN: Int;
+	static final CAL_FRENCH: Int;
+	static final CAL_GREGORIAN: Int;
+	static final CAL_JEWISH: Int;
+	static final CAL_JEWISH_ADD_ALAFIM: Int;
+	static final CAL_JEWISH_ADD_ALAFIM_GERESH: Int;
+	static final CAL_JEWISH_ADD_GERESHAYIM: Int;
+	static final CAL_JULIAN: Int;
+	static final CAL_MONTH_FRENCH: Int;
+	static final CAL_MONTH_GREGORIAN_LONG: Int;
+	static final CAL_MONTH_GREGORIAN_SHORT: Int;
+	static final CAL_MONTH_JEWISH: Int;
+	static final CAL_MONTH_JULIAN_LONG: Int;
+	static final CAL_MONTH_JULIAN_SHORT: Int;
+	static final CAL_NUM_CALS: Int;
 }

+ 10 - 0
std/php/Global.hx

@@ -1883,4 +1883,14 @@ extern class Global {
 		@see http://php.net/manual/en/function.quoted-printable-encode.php
 	**/
 	static function quoted_printable_encode(string:String):String;
+
+	/**
+		@see http://php.net/manual/en/function.easter-date.php
+	**/
+	static function easter_date(?year:Int, ?mode:Int): Int;
+
+	/**
+		@see http://php.net/manual/en/function.easter-days.php
+	**/
+	static function easter_days(?year:Int, ?mode:Int): Int;
 }