Expose attribute getters to the runtime
Summary:
This diff exposes two new functions to userspace:
```
namespace HH\Facts {
/**
* Get all attributes on the given type.
*
* Throw InvalidOperationException if Facts is not enabled.
*/
<<__Native>>
function type_attributes(
classname<mixed> $type,
): vec<classname<\HH\ClassAttribute>>;
/**
* Get all parameters for the given attribute on the given type.
*
* Throw InvalidOperationException if Facts is not enabled.
*/
<<__Native>>
function type_attribute_parameters(
classname<mixed> $type,
classname<\HH\ClassAttribute> $attribute,
): vec<dynamic>;
} // namespace HH\Facts
```
This allows us to get the attributes of a class without actually loading the unit which defines the class.
Reviewed By: dneiter
Differential Revision:
D23006450
fbshipit-source-id:
3309e8af7f36f0c443c23a1cf8916af31f0ad74d