| @@ 815-819 (lines=5) @@ | ||
| 812 | } |
|
| 813 | ||
| 814 | // remove excluded properties |
|
| 815 | foreach (array_keys($result) as $k) { |
|
| 816 | if (isset($namedExc[$k]) && !is_array($namedExc[$k])) { |
|
| 817 | unset($result[$k]); |
|
| 818 | } |
|
| 819 | } |
|
| 820 | ||
| 821 | // add included properties |
|
| 822 | foreach (array_keys($namedInc) as $k) { |
|
| @@ 822-826 (lines=5) @@ | ||
| 819 | } |
|
| 820 | ||
| 821 | // add included properties |
|
| 822 | foreach (array_keys($namedInc) as $k) { |
|
| 823 | if (!isset($result[$k]) && isset($namedInc[$k])) { |
|
| 824 | $result[$k] = $this->$k; |
|
| 825 | } |
|
| 826 | } |
|
| 827 | ||
| 828 | // expand any relational model properties |
|
| 829 | $result = $this->toArrayExpand($result, $namedExc, $namedInc, $namedExp); |
|