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.
halmon/application/classes/Model/Model.php
2013-10-17 15:15:13 +11:00

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));
}
}
?>