27 lines
584 B
PHP
27 lines
584 B
PHP
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
/**
|
|
* Panel Models
|
|
*
|
|
* @package HAlMon
|
|
* @category Models
|
|
* @author Deon George
|
|
* @copyright (c) 2010 Deon George
|
|
* @license http://dev.leenooks.net/license.html
|
|
*/
|
|
class Model_Model extends ORM {
|
|
protected $_has_many = array(
|
|
'alarm'=>array('far_key'=>'id'),
|
|
);
|
|
|
|
public function plugin(Protocol $eo,Model $ao) {
|
|
$x = 'Panel_'.$this->model;
|
|
|
|
if (class_exists($x))
|
|
return new $x($eo,$ao);
|
|
else
|
|
throw new Kohana_Exception('Unknown Panel :panel',array(':panel'=>$this->model));
|
|
}
|
|
}
|
|
?>
|