Started working on abstract db models from scratch
This commit is contained in:
37
src/admin/common/abstract/model.php
Normal file
37
src/admin/common/abstract/model.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
abstract class AbstractCommonClubsModel
|
||||
{
|
||||
protected $id; // TODO private possible?
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId($id)
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
private $values = null;
|
||||
|
||||
protected function getValues()
|
||||
{
|
||||
if(is_null($this->values))
|
||||
// FIXME fetch cache
|
||||
return;
|
||||
|
||||
return $this->values;
|
||||
}
|
||||
|
||||
public function setValues($values)
|
||||
{
|
||||
$this->values = $values;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user