summaryrefslogtreecommitdiff
path: root/app/Model/ProjectIntegration.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/ProjectIntegration.php')
-rw-r--r--app/Model/ProjectIntegration.php66
1 files changed, 0 insertions, 66 deletions
diff --git a/app/Model/ProjectIntegration.php b/app/Model/ProjectIntegration.php
deleted file mode 100644
index d07e4167..00000000
--- a/app/Model/ProjectIntegration.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-namespace Kanboard\Model;
-
-/**
- * Project integration
- *
- * @package model
- * @author Frederic Guillot
- */
-class ProjectIntegration extends Base
-{
- /**
- * SQL table name
- *
- * @var string
- */
- const TABLE = 'project_integrations';
-
- /**
- * Get all parameters for a project
- *
- * @access public
- * @param integer $project_id
- * @return array
- */
- public function getParameters($project_id)
- {
- return $this->db->table(self::TABLE)->eq('project_id', $project_id)->findOne() ?: array();
- }
-
- /**
- * Save parameters for a project
- *
- * @access public
- * @param integer $project_id
- * @param array $values
- * @return boolean
- */
- public function saveParameters($project_id, array $values)
- {
- if ($this->db->table(self::TABLE)->eq('project_id', $project_id)->exists()) {
- return $this->db->table(self::TABLE)->eq('project_id', $project_id)->update($values);
- }
-
- return $this->db->table(self::TABLE)->insert($values + array('project_id' => $project_id));
- }
-
- /**
- * Check if a project has the given parameter/value
- *
- * @access public
- * @param integer $project_id
- * @param string $option
- * @param string $value
- * @return boolean
- */
- public function hasValue($project_id, $option, $value)
- {
- return $this->db
- ->table(self::TABLE)
- ->eq('project_id', $project_id)
- ->eq($option, $value)
- ->exists();
- }
-}