Metadata Readers
Readers are responsible for reading and appending metadata from various sources. As is clear from the logic, all data passing through the reader chain is mutable.
In most cases, readers are implemented through delegation, so you can configure priorities for which data source is most important.
This package already provides a built-in set of readers that you can check out:
Reflection Reader - Reads metadata from a native type declarations
Attributes Reader - Reads metadata from PHP Attributes
PHPDoc Reader - Reads metadata from PHP DocBlock
Array Reader - Reads metadata from PHP Array
PHP Config Reader - Reads metadata from PHP config files
JSON Config Reader - Reads metadata from JSON config files
NEON Config Reader - Reads metadata from NEON config files
YAML Config Reader - Reads metadata from YAML config files
Null Reader - Returns empty metadata
You can pass the metadata reader to a platform that uses types that require metadata. So the complete example of using readers would look like this: