This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/modules/cart/classes/Cart/Item.php

37 lines
718 B
PHP
Raw Normal View History

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides a Cart Item
*
2013-03-19 22:35:19 +00:00
* @package Cart
* @category Helpers
* @author Deon George
2013-03-19 22:35:19 +00:00
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Cart_Item {
// Quantity
private $q = 0;
// Item
private $i = 0;
// Total
private $t = 0;
public function __construct($q,$i,$t) {
$this->q = $q;
$this->i = $i;
$this->t = $t;
}
public function __get($key) {
switch($key) {
case 'i':
case 'q': return $this->{$key};
case 't': return Currency::display($this->{$key});
default: throw new Kohana_Exception('Unknown Key :key',array(':key',$key));
}
}
}
?>