38 $r = new \ReflectionClass($this->
class);
39 $properties = $r->getProperties();
40 $newMembers = $this->model->getMembers();
41 $annotsEngine = $this->model->getAnnotsEngine();
42 foreach ($properties as $property) {
43 $propName = $property->getName();
45 if (isset($newMembers[$propName])) {
46 $newMember = $newMembers[$propName];
47 $propComparator->compareTo($newMember);
48 $preservedAttributes = $propComparator->compareAttributes();
49 if (\count($preservedAttributes) > 0) {
50 $newMember->addAnnotations($preservedAttributes);
53 if ($propComparator->maintain()) {
54 $m =
new Member($this->model, $annotsEngine, $propName);
56 $this->model->addMember($m);
60 if(\method_exists(\ReflectionMethod::class,
'getAttributes')){
61 $actualMethods=$r->getMethods();
62 $newMethods=$this->model->getMethods();
63 foreach ($actualMethods as $reflectionMethod){
65 $methodName=$reflectionMethod->getName();
66 if(\array_search($methodName,$newMethods)===
false){
67 $code=UIntrospection::getMethodCode($reflectionMethod,$this->classCode);
68 $annotations=$reflectionMethod->getAttributes();
69 if(\count($annotations)>0) {
70 $code = $this->model->getAnnotsEngine()->getAnnotationsStr($annotations).$code;
73 $this->extCode.=$code;
85 if(\method_exists($this->
class,$methodName)){
86 $r=new \ReflectionMethod($this->
class.
'::'.$methodName);
87 $oldCode=UIntrospection::getMethodCode($r,$this->classCode);
88 if(\method_exists(\ReflectionMethod::class,
'getAttributes')){
89 $annotations=$r->getAttributes();
90 if(\count($annotations)>0) {
91 $oldCode = $this->model->getAnnotsEngine()->getAnnotationsStr($annotations).$oldCode;