@@ 81-88 (lines=8) @@ | ||
78 | $objReflect = new \ReflectionClass($this); |
|
79 | } |
|
80 | $arrProperties = $objReflect->getProperties(); |
|
81 | foreach ($arrProperties as $objProperty) { |
|
82 | $objProperty->setAccessible(true); |
|
83 | $name = $objProperty->getName(); |
|
84 | if (in_array($name, $excludeAttribute) || !array_key_exists($name, $arrProps)) { |
|
85 | continue; |
|
86 | } |
|
87 | $objProperty->setValue($this, $arrProps[$name]); |
|
88 | } |
|
89 | ||
90 | // 親クラスがある場合は再帰的にプロパティを取得 |
|
91 | $parentClass = $objReflect->getParentClass(); |
|
@@ 118-125 (lines=8) @@ | ||
115 | } |
|
116 | $arrProperties = $objReflect->getProperties(); |
|
117 | $arrResults = []; |
|
118 | foreach ($arrProperties as $objProperty) { |
|
119 | $objProperty->setAccessible(true); |
|
120 | $name = $objProperty->getName(); |
|
121 | if (in_array($name, $excludeAttribute)) { |
|
122 | continue; |
|
123 | } |
|
124 | $arrResults[$name] = $objProperty->getValue($this); |
|
125 | } |
|
126 | ||
127 | $parentClass = $objReflect->getParentClass(); |
|
128 | if (is_object($parentClass)) { |