================ Reading metadata ================ Your starting point is instance of ``RunOpenCode\Component\Metadata\Contract\MetadataReaderInterface``. Reader provides you with methods to: * Check if class is marked with specific attribute. * Get instance of `RunOpenCode\Component\Metadata\Contract\ClassMetadataInterface`` for further processing (i.e. searching for attributes on class, properties and methods). * Find properties and methods that are marked with specific attributes. Properties and methods may be searched separately or together. Each property or method found is represented with instance of ``RunOpenCode\Component\Metadata\Contract\PropertyMetadataInterface`` and ``RunOpenCode\Component\Metadata\Contract\MethodMetadataInterface`` respectively. Class attributes and members resolution --------------------------------------- When reading metadata from classes, getting attributes from class is simple, only attributes from the current class are considered, no inheritance is consulted. However, should you need to read class attributes from parent classes, you may use ``RunOpenCode\Component\Metadata\Contract\ClassMetadataInterface::$parent`` property to traverse the class hierarchy. When comes to members (properties and methods), library will resolve members navigating the class hierarchy, meaning that members from parent classes will be considered as well. Rules for resolving members are as follows: * **Private members**: All private members are considered from all classes in the hierarchy. This means that if a parent class has a private property or method, it will be included in the results, even though there is a name collision with a child class member. * **Public and protected members**: Only the members from the most derived class are considered. If a child class overrides a public or protected member from a parent class, only the child class member will be included in the results. This resolution strategy can be explained with the example given below (do note that example uses properties only for brevity, but the same rules apply to methods as well): .. code-block:: php :linenos: