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

22 lines
483 B
PHP
Raw Normal View History

2011-07-19 05:57:37 +00:00
<?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();
}
}
?>