/** * Constructor * * @param array $record */ public function __construct(array $record) { $this->ruleId = $record['ruleid']; $this->week = $this->_toInt($record['week']); $this->status = $this->_toBoolean($record['status']); $this->checkinTime = explode(':', Dao_App_Attend_Schedule::formatTime($record['checkintime'])); $this->checkoutTime = explode(':', Dao_App_Attend_Schedule::formatTime($record['checkouttime'])); parent::__construct(); }
/** * Constructor * * @param array $record */ public function __construct(array $record) { $this->orgId = $record['orgid']; $this->uniqueId = $record['uniqueid']; $this->scheduleId = $record['scheduleid']; $this->name = $record['name']; $this->isSystem = $this->_toBoolean($record['issystem']); $this->bgcolor = isset($record['bgcolor']) ? $record['bgcolor'] : null; $this->ruleId = isset($record['ruleid']) ? $record['ruleid'] : null; $this->week = isset($record['week']) ? $this->_toInt($record['week']) : null; $this->checkinTime = Dao_App_Attend_Schedule::formatTime($record['checkintime']); $this->checkoutTime = Dao_App_Attend_Schedule::formatTime($record['checkouttime']); $this->lateStandard = $this->_toInt($record['latestandard']); $this->lateCheckin = $this->_toInt($record['latecheckin']); $this->leaveCheckout = $this->_toInt($record['leavecheckout']); $this->status = isset($record['status']) ? $this->_toBoolean($record['status']) : null; $this->createTime = $this->_toTimestamp($record['createtime']); if (null !== $record['checkouttime'] && null !== $record['checkintime']) { $workTime = (int) $record['checkouttime'] - (int) $record['checkintime']; } else { $workTime = 0; } $this->workTime = Dao_App_Attend_Schedule::formatTime($workTime, true); parent::__construct(); }
/** * Constructor * * @param array $record */ public function __construct(array $record) { $this->orgId = $record['orgid']; $this->uniqueId = $record['uniqueid']; $this->scheduleId = $record['scheduleid']; $this->name = $record['name']; $this->planId = $record['planid']; $this->type = $record['type']; $this->value = $record['value']; $this->cycleNum = $record['cyclenum']; $this->checkinTime = Dao_App_Attend_Schedule::formatTime($record['checkintime']); $this->checkoutTime = Dao_App_Attend_Schedule::formatTime($record['checkouttime']); $this->lateStandard = isset($record['latestandard']) ? $this->_toInt($record['latestandard']) : null; $this->lateCheckin = isset($record['latecheckin']) ? $this->_toInt($record['latecheckin']) : null; $this->leaveStandard = isset($record['leavestandard']) ? $this->_toInt($record['leavestandard']) : null; $this->leaveCheckout = isset($record['leavecheckout']) ? $this->_toInt($record['leavecheckout']) : null; $this->status = isset($record['status']) ? $this->_toBoolean($record['status']) : null; $this->startTime = isset($record['starttime']) ? $this->_toTimestamp($record['starttime']) : null; $this->endTime = isset($record['endtime']) ? $this->_toTimestamp($record['endtime']) : null; parent::__construct(); }