示例#1
0
文件: RegExp.php 项目: mk-pmb/js2php
 /**
  * Creates the global constructor used in user-land
  * @return Func
  */
 static function getGlobalConstructor()
 {
     $RegExp = new Func(function () {
         $reg = new RegExp();
         $reg->init(func_get_args());
         return $reg;
     });
     $RegExp->set('prototype', RegExp::$protoObject);
     $RegExp->setMethods(RegExp::$classMethods, true, false, true);
     return $RegExp;
 }