3 ms·
i'd advise the OP to pass in an array. and look into an API-inspired pattern which organizes code and above all, proper type-chcking and error handling. for in
by jaequery 14y ago
i'd advise the OP to pass in an array. and look into an API-inspired pattern which organizes code and above all, proper type-chcking and error handling.
for instance:
$result = App:api('/do/something', array(name=>'john', age=>10, etc));
class Do extends Api {
function something($params = array('name'=>'', age=>'')){
...
}
}