Removed the duration method and replaced with explicit methods to get start and end
This commit is contained in:
parent
a412256598
commit
e67634b62b
@ -91,19 +91,14 @@ class Inventory {
|
|||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function get_duration($format = true) {
|
public function get_starttime() {
|
||||||
$style = function($time) {
|
return $this->starttime;
|
||||||
return $time;
|
|
||||||
};
|
|
||||||
if($format) {
|
|
||||||
$style = function($time) {
|
|
||||||
return gmdate('Y-m-d', $time);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
return array('start' => $style($this->starttime),
|
|
||||||
'end' => $style($this->endtime));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_endtime() {
|
||||||
|
return $this->endtime;
|
||||||
|
}
|
||||||
|
|
||||||
public function get_seen_products() {
|
public function get_seen_products() {
|
||||||
$out = array();
|
$out = array();
|
||||||
foreach($this->seen_products as $prodid) {
|
foreach($this->seen_products as $prodid) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user