/** * Returns an array of reflection property instances from the passed reflection class. * * @param \AppserverIo\Lang\Reflection\ReflectionClass $reflectionClass The reflection class to return the properties for * @param integer $filter The filter used for loading the properties * @param array $annotationsToIgnore An array with annotations names we want to ignore when loaded * @param array $annotationAliases An array with annotation aliases used when create annotation instances * * @return array An array with ReflectionProperty instances */ public static function fromReflectionClass(ReflectionClass $reflectionClass, $filter = 0, array $annotationsToIgnore = array(), array $annotationAliases = array()) { // initialize the array for the reflection properties $reflectionProperties = array(); // load the reflection properties and initialize the array with the reflection properties $phpReflectionClass = $reflectionClass->toPhpReflectionClass(); foreach ($phpReflectionClass->getProperties($filter) as $phpReflectionProperty) { $reflectionProperties[$phpReflectionProperty->getName()] = ReflectionProperty::fromPhpReflectionProperty($phpReflectionProperty, $annotationsToIgnore, $annotationAliases); } // return the array with the initialized reflection properties return $reflectionProperties; }