コード例 #1
0
 public function testHydratePropertyNotFound()
 {
     $reflectonClass = new ReflectionClass(Entity::class);
     try {
         $reflectonClass->getProperty('blub');
     } catch (\ReflectionException $excep) {
     }
 }
コード例 #2
0
 /**
  * @param BaseReflectionClass $reflectionClass
  * @param int                 $filter
  * @param array               &$properties
  */
 private function collectParentProperties(\ReflectionClass $reflectionClass, $filter, array &$properties)
 {
     $properties = array_merge($properties, $reflectionClass->getProperties($filter));
     $parent = $reflectionClass->getParentClass();
     if ($parent) {
         $this->collectParentProperties($parent, $filter, $properties);
     }
 }