PHP Value Object auto create
- by JonoB
Assume that I have a class value object defined in php, where each variable in the class is defined. Something like:
class UserVO {
public $id;
public $name;
}
I now have a function in another class, which is expecting an array ($data).
function save_user($data) {
//run code to save the user
}
How do I tell php that the $data parameter…