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

27 lines
584 B
PHP
Raw Normal View History

2011-07-19 05:57:37 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
2013-10-17 04:15:13 +00:00
* Panel Models
2011-07-19 05:57:37 +00:00
*
2013-10-17 04:15:13 +00:00
* @package HAlMon
2011-07-19 05:57:37 +00:00
* @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'),
);
2013-10-17 04:15:13 +00:00
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));
}
2011-07-19 05:57:37 +00:00
}
?>