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/application/classes/Model/Module/Method.php

27 lines
832 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* OSB Application Module Method Model
*
* @package OSB
* @category Models
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Model_Module_Method extends lnAuth_Model_Module_Method {
// Temporarily adjust our name
// @todo This is temporary until all our method names are colon delimited.
protected function _load_values(array $values) {
parent::_load_values($values);
if (substr_count($this->name,'_') == 1 AND ! substr_count($this->name,':'))
$this->name = str_replace('_',':',$this->name);
elseif (substr_count($this->name,'_') > 1)
throw HTTP_Exception::factory(501,'Method :id has double underscore',array(':id'=>$this->id));
return $this;
}
}
?>