Initial import: Carteasy Shop (Dev-Stand)
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
class OrderItem {
|
||||
|
||||
private $_db;
|
||||
private $_id;
|
||||
|
||||
public function __construct($id=false) {
|
||||
$this->_db = Registry::get('base')->db;
|
||||
$this->_id = $id;
|
||||
}
|
||||
|
||||
public function has_id() {
|
||||
if ($this->_id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function get_id() {
|
||||
return $this->_id;
|
||||
}
|
||||
|
||||
public function set_id($id) {
|
||||
$this->_id = $id;
|
||||
}
|
||||
|
||||
public function get_all() {
|
||||
|
||||
}
|
||||
|
||||
public function create($data) {
|
||||
|
||||
}
|
||||
|
||||
public function update($data) {
|
||||
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
|
||||
}
|
||||
|
||||
public function save($data) {
|
||||
if (isset($data['id'])) {
|
||||
$this->_id = $data['id'];
|
||||
unset($data['id']);
|
||||
|
||||
$this->update($data);
|
||||
} else {
|
||||
$this->create($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user