Hey, I'm looking for a bit of advice here, I have a simple model with the usual save, delete and find methods, but wanted to create a getAll method aswell, it feels wrong putting it in the model as its not related to the actual model. Which way should I design this?
My current model looks like this:
<?php
class User {
$id;
$name;
$address;
public function __construct() {
// do some constructor stuff
}
public function save() {
// insert into....
}
public function delete() {
// delete from user where ....
}
public function find($id) {
// select * from user where ...
}
}
?>
Any help would be much appreciated, Thanks