Commit 833eaa9b by TingSong-Syu

adjust AssignTrait to fit x2ts 2.3.0

parent 42792857
......@@ -10,6 +10,7 @@
}
],
"require": {
"x2ts/x2ts": "^2.3.0",
"x2ts/x2ts-rpc": "^2.1.2"
},
"autoload": {
......
......@@ -10,7 +10,12 @@ namespace neoteched\rpc\traits;
trait AssignTrait {
public function assign(array $array) {
/**
* @param array|\Traversable $array
*
* @return $this
*/
public function assign($array) {
foreach ($array as $key => $value) {
if (property_exists($this, $key)) {
$this->$key = $value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment