ReflectionClass.hx 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package php.reflection;
  2. import haxe.extern.Rest;
  3. @:native('ReflectionClass')
  4. extern class ReflectionClass implements Reflector {
  5. @:phpClassConst static var IS_IMPLICIT_ABSTRACT : Int;
  6. @:phpClassConst static var IS_EXPLICIT_ABSTRACT : Int;
  7. @:phpClassConst static var IS_FINAL : Int;
  8. static function export( argument:Dynamic, returnValue:Bool = false ) : String;
  9. var name : String;
  10. function new( argument:Dynamic ) : Void;
  11. function getConstant( name:String ) : Dynamic;
  12. function getConstants() : NativeAssocArray<Dynamic>;
  13. function getConstructor() : ReflectionMethod;
  14. function getDefaultProperties() : NativeAssocArray<Dynamic>;
  15. function getDocComment() : String;
  16. function getEndLine() : Int;
  17. // function getExtension() : ReflectionExtension;
  18. function getExtensionName() : String;
  19. function getFileName() : String;
  20. function getInterfaceNames() : NativeIndexedArray<String>;
  21. function getInterfaces() : NativeIndexedArray<ReflectionClass>;
  22. function getMethod( name:String ) : ReflectionMethod;
  23. function getMethods( ?filter:Int ) : NativeIndexedArray<ReflectionMethod>;
  24. function getModifiers() : Int;
  25. function getName() : String;
  26. function getNamespaceName() : String;
  27. function getParentClass() : Null<ReflectionClass>;
  28. function getProperties( ?filter:Int ) : NativeIndexedArray<ReflectionProperty>;
  29. function getProperty( name:String ) : ReflectionProperty;
  30. function getShortName() : String;
  31. function getStartLine() : Int;
  32. function getStaticProperties() : NativeAssocArray<Dynamic>;
  33. function getStaticPropertyValue( name:String, ?def_value:Ref<Dynamic> ) : Dynamic;
  34. function getTraitAliases() : NativeAssocArray<String>;
  35. function getTraitNames() : NativeIndexedArray<String>;
  36. function getTraits() : NativeIndexedArray<ReflectionClass>;
  37. function hasConstant( name:String ) : Bool;
  38. function hasMethod( name:String ) : Bool;
  39. function hasProperty( name:String ) : Bool;
  40. function implementsInterface( interfaceName:String ) : Bool;
  41. function inNamespace() : Bool;
  42. function isAbstract() : Bool;
  43. function isAnonymous() : Bool;
  44. function isCloneable() : Bool;
  45. function isFinal() : Bool;
  46. function isInstance( object:{} ) : Bool;
  47. function isInstantiable() : Bool;
  48. function isInterface() : Bool;
  49. function isInternal() : Bool;
  50. function isIterateable() : Bool;
  51. function isSubclassOf( className:String ) : Bool;
  52. function isTrait() : Bool;
  53. function isUserDefined() : Bool;
  54. function newInstance( args:Rest<Dynamic> ) : Dynamic;
  55. function newInstanceArgs( ?args:NativeIndexedArray<Dynamic> ) : Dynamic;
  56. function newInstanceWithoutConstructor() : Dynamic;
  57. function setStaticPropertyValue( name:String , value:String ) : Void;
  58. @:phpMagic function __toString() : String;
  59. }