RealyUniqueName / haxe

Haxe - The Cross-Platform Toolkit

Home Page:http://haxe.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoke native PHP class constants

RealyUniqueName opened this issue · comments

Right now there is no way (except untyped) to access PHP class constants from Haxe code.
Perhaps some meta for extern static vars can tell compiler that var is actually a class constant.

Yes, there should be a special metadata for that, I'd say.

Implemented in 19c773f
Meta for externs to generate static var fields as class constants: @:phpClassConst
Example: https://github.com/RealyUniqueName/haxe/blob/php7/std/php7/reflection/ReflectionClass.hx#L7