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/trigger.php
2013-10-16 09:55:29 +11:00

22 lines
483 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
/**
*
* @package HAM
* @subpackage Trigger
* @category Models
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
class Model_Trigger extends ORM {
protected $_has_one = array(
'contact'=>array('foreign_key'=>'id'),
);
public function trigger($code) {
return $this->where('alarm','=',$code)->or_where('alarm','=',null)->find();
}
}
?>