/** * Gets a list of properties. * * @param int $filter The optional filter, for filtering desired property types. It's configured * using the `ReflectionProperty` constants. * * @return ReflectionProperty[] An array of `ReflectionProperty` objects. */ public function getProperties($filter = null) { $properties = array(); foreach (parent::getProperties($filter) as $property) { /* @var \ReflectionProperty $property */ $properties[] = new ReflectionProperty($property->class, $property->name); } return $properties; }
/** * Test if the `getAnnotationList` method return a list of all annotations in a doc comment. */ public function testGetAnnotationList() { $className = '\\com\\mohiva\\test\\resources\\common\\lang\\AnnotationTest'; $object = new ReflectionObject(new $className()); $this->assertInstanceOf('com\\mohiva\\common\\lang\\AnnotationList', $object->getAnnotationList()); }