OSB enhancements to date

This commit is contained in:
Deon George
2010-11-30 09:41:08 +11:00
parent 8715a2059b
commit ec6a542bc3
478 changed files with 23423 additions and 9309 deletions

View File

@@ -0,0 +1,50 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides OSB service task capabilities.
*
* @package OSB
* @subpackage Service
* @category Controllers/Task
* @author Deon George
* @copyright (c) 2010 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Task_Service extends Controller_Template {
/**
* List all services by their default checkout method
*/
public function action_gettraffic() {
// @todo This things to collect traffic on needs to be configurable
foreach (array('ExetelVisp','ExetelHSPA','PeopleAgent','iiNetADSL') as $source) {
$traffic = Service_Traffic_ADSL::instance($source);
$traffic->update_traffic();
}
}
/**
* Charges for excess traffic usage
*/
public function action_chargetraffic() {
// @todo This things to collect traffic on needs to be configurable
foreach (array('ExetelVisp','ExetelHSPA','PeopleAgent','iiNetADSL') as $source) {
$traffic = Service_Traffic_ADSL::instance($source);
$traffic->charge_excess_traffic();
}
}
/**
* Send alerts to users when they exceed their traffic allowance
*/
public function action_alerttraffic() {
// @todo This things to collect traffic on needs to be configurable
foreach (array('ExetelVisp','ExetelHSPA','PeopleAgent','iiNetADSL') as $source) {
$traffic = Service_Traffic_ADSL::instance($source);
$traffic->alert_traffic();
}
}
}
?>