36 lines
676 B
PHP
36 lines
676 B
PHP
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||
|
|
||
|
const PROTOCOL_CONTACTID=1;
|
||
|
|
||
|
/**
|
||
|
* This class is handling Events
|
||
|
*
|
||
|
* @package HAlMon
|
||
|
* @category Helpers
|
||
|
* @author Deon George
|
||
|
* @copyright (c) 2010 Deon George
|
||
|
* @license http://dev.leenooks.net/license.html
|
||
|
*/
|
||
|
abstract class Protocol {
|
||
|
// Raw event ID
|
||
|
protected $_id = NULL;
|
||
|
protected $_protocol = NULL;
|
||
|
|
||
|
public function __construct($event) {
|
||
|
$this->_id = $this->check($event) ? $event : NULL;
|
||
|
}
|
||
|
|
||
|
public function __toString() {
|
||
|
return (string)$this->event();
|
||
|
}
|
||
|
|
||
|
public function event() {
|
||
|
return $this->_id;
|
||
|
}
|
||
|
|
||
|
public function protocol() {
|
||
|
return $this->_protocol;
|
||
|
}
|
||
|
}
|
||
|
?>
|