array('model'=>'ADSL_Plan','far_key'=>'id'), ); protected $_belongs_to = array( 'adsl_supplier'=>array('model'=>'ADSL_Supplier','foreign_key'=>'supplier_id'), ); /** * Show the ADSL allowance as a peak/offpeak metric */ public function allowance() { return sprintf('%s/%s',$this->base_down_peak+$this->base_up_peak,$this->base_down_offpeak+$this->base_up_offpeak); } public function tax() { // @todo This should be taken from the users session // @todo rounding should be a system default return round($this->base_cost*.1,2); } public function name() { return $this->product_id; } } ?>