'ASC', ); protected $_has_one = array( 'NODE'=>array('foreign_key'=>'NODE_NAME','far_key'=>'ENTITY'), ); protected $_display_filters = array( 'START_TIME'=>array( array('ORM_TSM::date',array(':value','d-M H:i')), ), 'END_TIME'=>array( array('ORM_TSM::date',array(':value','d-M H:i')), ), ); /** * Return if this ACTIVITY SUMMARY would be still in the ACTIVITY LOG */ public function inActLog() { return ORM_TSM::date(ORM::factory('ACTLOG')->FirstRec(),'U') <= $this->start(); } /** * Get the ACTIVITY LOG data for this SESSION */ public function actlog() { if (! isset($this->ENTITY)) throw new Kohana_Exception('Activity Summary has no NODENAME data'); return $this->NODE->actlog_session($this->NUMBER,$this->start()); } /** * Return this ACTIVITY SUMMARY in GB */ public function bytes() { return (real)number_format($this->BYTES/1024/1024,0,'',''); } /** * Return this ACTIVITY SUMMARY start time in seconds since epoch */ public function start() { return ORM_TSM::date($this->START_TIME,'U'); } } ?>