null, 'config_checksum' => null, 'last_activity_checksum' => null, 'peer_identity' => null, 'start_time' => null, 'end_time' => null, 'abort_time' => null, 'duration_connection' => null, 'duration_dump' => null, 'stage_name' => null, 'stage_collected' => null, 'connection_succeeded' => null, 'dump_succeeded' => null, 'startup_succeeded' => null, 'username' => null, 'startup_log' => null, ); public function getConfigHexChecksum() { return Util::binary2hex($this->config_checksum); } public function getConfig() { if ($this->config === null) { $this->config = IcingaConfig::load($this->config_checksum); } return $this->config; } public function configEquals(IcingaConfig $config) { return $this->config_checksum === $config->getChecksum(); } public function getDeploymentTimestamp() { return strtotime($this->start_time); } public static function hasDeployments(Db $connection) { $db = $connection->getDbAdapter(); $query = $db->select()->from( 'director_deployment_log', array('c' => 'COUNT(*)') ); return (int) $db->fetchOne($query) > 0; } public static function loadLatest(Db $connection) { $db = $connection->getDbAdapter(); $query = $db->select()->from( 'director_deployment_log', array('id' => 'MAX(id)') ); return static::load($db->fetchOne($query), $connection); } }