I’ve written a couple classes for pulling down REST data. One of the classes registers users and copies their info; another runs possible jobs and handles results. What should I do with the third part, that schedules jobs or has UI for creating jobs?
Anyway to rewrite this so I have one class for the UI methods the browser uses? Thanks!
[code=php]
class jobs extends utils
{
public $user;
public $userAccounts;
function __construct()
{
$this->getDb();
}
public function getUser() {
}
}
class jobQuery extends utils
{
public $errors;
public $log;
function __construct()
{
parent::getDb();
$this->countBatched();
$this->countRemaining();
}
public function saveQuery($q) {
}
public function runQuery($q) {
}
public function saveResult($r) {
}
}
class jobsUi extends jobQuery //?
{
public function saveQuery($q) {
print ‘Hi’;
$this->saveQuery($q);
}
public function editQueries($q) {
print ‘Careful!’;
$this->saveQuery($q);
}
public function runQueries() {
print ‘Look at this: ‘;
$this->runQuery($this->queries);
}
}