Added database-based yml build config

This commit is contained in:
Dmitry Khomutov 2014-03-15 12:18:12 +07:00
commit 60bf262ee7
5 changed files with 88 additions and 32 deletions

View file

@ -37,6 +37,7 @@ class ProjectBase extends Model
'title' => null,
'reference' => null,
'git_key' => null,
'build_config' => null,
'type' => null,
'token' => null,
'access_information' => null,
@ -52,6 +53,7 @@ class ProjectBase extends Model
'title' => 'getTitle',
'reference' => 'getReference',
'git_key' => 'getGitKey',
'build_config' => 'getBuildConfig',
'type' => 'getType',
'token' => 'getToken',
'access_information' => 'getAccessInformation',
@ -69,6 +71,7 @@ class ProjectBase extends Model
'title' => 'setTitle',
'reference' => 'setReference',
'git_key' => 'setGitKey',
'build_config' => 'setBuildConfig',
'type' => 'setType',
'token' => 'setToken',
'access_information' => 'setAccessInformation',
@ -103,6 +106,11 @@ class ProjectBase extends Model
'nullable' => true,
'default' => null,
),
'build_config' => array(
'type' => 'text',
'nullable' => true,
'default' => null,
),
'type' => array(
'type' => 'varchar',
'length' => 50,
@ -132,8 +140,8 @@ class ProjectBase extends Model
* @var array
*/
public $indexes = array(
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
'idx_project_title' => array('columns' => 'title'),
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
'idx_project_title' => array('columns' => 'title'),
);
/**
@ -149,7 +157,7 @@ class ProjectBase extends Model
*/
public function getId()
{
$rtn = $this->data['id'];
$rtn = $this->data['id'];
return $rtn;
}
@ -161,7 +169,7 @@ class ProjectBase extends Model
*/
public function getTitle()
{
$rtn = $this->data['title'];
$rtn = $this->data['title'];
return $rtn;
}
@ -173,7 +181,7 @@ class ProjectBase extends Model
*/
public function getReference()
{
$rtn = $this->data['reference'];
$rtn = $this->data['reference'];
return $rtn;
}
@ -185,7 +193,19 @@ class ProjectBase extends Model
*/
public function getGitKey()
{
$rtn = $this->data['git_key'];
$rtn = $this->data['git_key'];
return $rtn;
}
/**
* Get the value of BuildConfig / build_config.
*
* @return string
*/
public function getBuildConfig()
{
$rtn = $this->data['build_config'];
return $rtn;
}
@ -197,7 +217,7 @@ class ProjectBase extends Model
*/
public function getType()
{
$rtn = $this->data['type'];
$rtn = $this->data['type'];
return $rtn;
}
@ -209,7 +229,7 @@ class ProjectBase extends Model
*/
public function getToken()
{
$rtn = $this->data['token'];
$rtn = $this->data['token'];
return $rtn;
}
@ -221,7 +241,7 @@ class ProjectBase extends Model
*/
public function getAccessInformation()
{
$rtn = $this->data['access_information'];
$rtn = $this->data['access_information'];
return $rtn;
}
@ -233,7 +253,7 @@ class ProjectBase extends Model
*/
public function getLastCommit()
{
$rtn = $this->data['last_commit'];
$rtn = $this->data['last_commit'];
return $rtn;
}
@ -316,6 +336,24 @@ class ProjectBase extends Model
$this->_setModified('git_key');
}
/**
* Set the value of BuildConfig / build_config.
*
* @param $value string
*/
public function setBuildConfig($value)
{
$this->_validateString('BuildConfig', $value);
if ($this->data['build_config'] === $value) {
return;
}
$this->data['build_config'] = $value;
$this->_setModified('build_config');
}
/**
* Set the value of Type / type.
*