@@ 918-920 (lines=3) @@ | ||
915 | */ |
|
916 | public function bindModel($params, $reset = true) { |
|
917 | foreach ($params as $assoc => $model) { |
|
918 | if ($reset === true && !isset($this->__backAssociation[$assoc])) { |
|
919 | $this->__backAssociation[$assoc] = $this->{$assoc}; |
|
920 | } |
|
921 | ||
922 | foreach ($model as $key => $value) { |
|
923 | $assocName = $key; |
|
@@ 936-938 (lines=3) @@ | ||
933 | unset($this->{$assocName}); |
|
934 | } |
|
935 | ||
936 | if ($reset === false && isset($this->__backAssociation[$assoc])) { |
|
937 | $this->__backAssociation[$assoc][$assocName] = $value; |
|
938 | } |
|
939 | } |
|
940 | } |
|
941 | ||
@@ 966-968 (lines=3) @@ | ||
963 | */ |
|
964 | public function unbindModel($params, $reset = true) { |
|
965 | foreach ($params as $assoc => $models) { |
|
966 | if ($reset === true && !isset($this->__backAssociation[$assoc])) { |
|
967 | $this->__backAssociation[$assoc] = $this->{$assoc}; |
|
968 | } |
|
969 | ||
970 | foreach ($models as $model) { |
|
971 | if ($reset === false && isset($this->__backAssociation[$assoc][$model])) { |