RealyUniqueName / haxe

Haxe - The Cross-Platform Toolkit

Home Page:http://haxe.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename things which has names conflicting with PHP

RealyUniqueName opened this issue · comments

  • Generated class names not use PHP keywords;
  • Methods of classes in global namespace should not use the same name as class name unless those classes have real constructor defined.

Everything which starts with $ is allowed to use keywords

As of PHP 7.0.0 these keywords are allowed as as property, constant, and method names of classes, interfaces and traits, except that class may not be used as constant name.

So the task is:

  • Rename class names which are keywords;
  • Force constructor generation on each class;

Implemented in fab542b, 5e764ac, 6d19162, 5b8f2a3