* Copies the members of obj1 that have public getters to obj2 if there exists a public setter in obj2 of the same suffix, it will also copy public variables.
9
*
10
* @param $obj1
11
* @param $obj2
12
*/
13
public static function copy($obj1, $obj2)
14
{
15
if (!is_object($obj1)) {
16
throw new \Exception('$obj1 must be an object, not '.gettype($obj1));
17
}
18
if (!is_object($obj2)) {
19
throw new \Exception('$obj2 must be an object, not '.gettype($obj2));