2013-05-03 17:02:53 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Project base model for table: project
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace PHPCI\Model\Base;
|
2013-05-16 16:40:40 +02:00
|
|
|
|
2014-02-25 17:43:06 +01:00
|
|
|
use PHPCI\Model;
|
2013-10-10 02:01:06 +02:00
|
|
|
use b8\Store\Factory;
|
2013-05-03 17:02:53 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Project Base Model
|
|
|
|
*/
|
|
|
|
class ProjectBase extends Model
|
|
|
|
{
|
2013-05-16 16:40:40 +02:00
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var array
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public static $sleepable = array();
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
protected $tableName = 'project';
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
protected $modelName = 'Project';
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var array
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
protected $data = array(
|
2014-04-30 15:14:23 +02:00
|
|
|
'id' => null,
|
|
|
|
'title' => null,
|
|
|
|
'reference' => null,
|
2014-05-13 17:15:06 +02:00
|
|
|
'ssh_private_key' => null,
|
|
|
|
'ssh_public_key' => null,
|
2014-04-30 15:14:23 +02:00
|
|
|
'type' => null,
|
2013-10-08 08:21:46 +02:00
|
|
|
'access_information' => null,
|
2014-04-30 15:14:23 +02:00
|
|
|
'last_commit' => null,
|
|
|
|
'build_config' => null,
|
2014-04-30 16:00:35 +02:00
|
|
|
'allow_public_status' => null,
|
2013-10-10 02:01:06 +02:00
|
|
|
);
|
2013-05-16 16:40:40 +02:00
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var array
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
protected $getters = array(
|
2013-10-10 02:01:06 +02:00
|
|
|
// Direct property getters:
|
2014-04-30 15:14:23 +02:00
|
|
|
'id' => 'getId',
|
|
|
|
'title' => 'getTitle',
|
|
|
|
'reference' => 'getReference',
|
2014-05-13 17:15:06 +02:00
|
|
|
'ssh_private_key' => 'getSshPrivateKey',
|
|
|
|
'ssh_public_key' => 'getSshPublicKey',
|
2014-04-30 15:14:23 +02:00
|
|
|
'type' => 'getType',
|
2013-10-08 08:21:46 +02:00
|
|
|
'access_information' => 'getAccessInformation',
|
2014-04-30 15:14:23 +02:00
|
|
|
'last_commit' => 'getLastCommit',
|
|
|
|
'build_config' => 'getBuildConfig',
|
2014-04-30 16:00:35 +02:00
|
|
|
'allow_public_status' => 'getAllowPublicStatus',
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-10-10 02:01:06 +02:00
|
|
|
// Foreign key getters:
|
|
|
|
);
|
2013-05-16 16:40:40 +02:00
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var array
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
protected $setters = array(
|
2013-10-10 02:01:06 +02:00
|
|
|
// Direct property setters:
|
2014-04-30 15:14:23 +02:00
|
|
|
'id' => 'setId',
|
|
|
|
'title' => 'setTitle',
|
|
|
|
'reference' => 'setReference',
|
2014-05-13 17:15:06 +02:00
|
|
|
'ssh_private_key' => 'setSshPrivateKey',
|
|
|
|
'ssh_public_key' => 'setSshPublicKey',
|
2014-04-30 15:14:23 +02:00
|
|
|
'type' => 'setType',
|
2013-10-08 08:21:46 +02:00
|
|
|
'access_information' => 'setAccessInformation',
|
2014-04-30 15:14:23 +02:00
|
|
|
'last_commit' => 'setLastCommit',
|
|
|
|
'build_config' => 'setBuildConfig',
|
2014-04-30 16:00:35 +02:00
|
|
|
'allow_public_status' => 'setAllowPublicStatus',
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-10-10 02:01:06 +02:00
|
|
|
// Foreign key setters:
|
|
|
|
);
|
2013-05-16 16:40:40 +02:00
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var array
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public $columns = array(
|
2014-04-30 15:14:23 +02:00
|
|
|
'id' => array(
|
|
|
|
'type' => 'int',
|
|
|
|
'length' => 11,
|
|
|
|
'primary_key' => true,
|
2013-05-16 16:40:40 +02:00
|
|
|
'auto_increment' => true,
|
2014-04-30 15:14:23 +02:00
|
|
|
'default' => null,
|
2013-10-10 02:01:06 +02:00
|
|
|
),
|
2014-04-30 15:14:23 +02:00
|
|
|
'title' => array(
|
|
|
|
'type' => 'varchar',
|
|
|
|
'length' => 250,
|
2014-02-25 17:43:06 +01:00
|
|
|
'default' => null,
|
2013-10-10 02:01:06 +02:00
|
|
|
),
|
2014-04-30 15:14:23 +02:00
|
|
|
'reference' => array(
|
|
|
|
'type' => 'varchar',
|
|
|
|
'length' => 250,
|
2014-02-25 17:43:06 +01:00
|
|
|
'default' => null,
|
2013-10-10 02:01:06 +02:00
|
|
|
),
|
2014-05-13 17:15:06 +02:00
|
|
|
'ssh_private_key' => array(
|
2014-04-30 15:14:23 +02:00
|
|
|
'type' => 'text',
|
2013-10-08 10:00:22 +02:00
|
|
|
'nullable' => true,
|
2014-04-30 15:14:23 +02:00
|
|
|
'default' => null,
|
2013-10-10 02:01:06 +02:00
|
|
|
),
|
2014-05-13 17:15:06 +02:00
|
|
|
'ssh_public_key' => array(
|
2014-04-30 15:14:23 +02:00
|
|
|
'type' => 'text',
|
2014-03-15 06:18:12 +01:00
|
|
|
'nullable' => true,
|
2014-04-30 15:14:23 +02:00
|
|
|
'default' => null,
|
2014-03-15 06:18:12 +01:00
|
|
|
),
|
2014-04-30 15:14:23 +02:00
|
|
|
'type' => array(
|
|
|
|
'type' => 'varchar',
|
|
|
|
'length' => 50,
|
2013-10-10 02:01:06 +02:00
|
|
|
'default' => 1,
|
|
|
|
),
|
2013-10-08 08:21:46 +02:00
|
|
|
'access_information' => array(
|
2014-04-30 15:14:23 +02:00
|
|
|
'type' => 'varchar',
|
|
|
|
'length' => 250,
|
2013-10-08 10:00:22 +02:00
|
|
|
'nullable' => true,
|
2014-04-30 15:14:23 +02:00
|
|
|
'default' => null,
|
2013-10-10 02:01:06 +02:00
|
|
|
),
|
2014-04-30 15:14:23 +02:00
|
|
|
'last_commit' => array(
|
|
|
|
'type' => 'varchar',
|
|
|
|
'length' => 250,
|
2013-11-18 22:49:18 +01:00
|
|
|
'nullable' => true,
|
2014-04-30 15:14:23 +02:00
|
|
|
'default' => null,
|
|
|
|
),
|
|
|
|
'build_config' => array(
|
|
|
|
'type' => 'text',
|
|
|
|
'nullable' => true,
|
|
|
|
'default' => null,
|
2013-11-18 22:49:18 +01:00
|
|
|
),
|
2014-04-30 16:00:35 +02:00
|
|
|
'allow_public_status' => array(
|
|
|
|
'type' => 'tinyint',
|
|
|
|
'length' => 4,
|
|
|
|
),
|
2013-10-10 02:01:06 +02:00
|
|
|
);
|
2013-05-16 16:40:40 +02:00
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var array
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public $indexes = array(
|
2014-04-30 15:14:23 +02:00
|
|
|
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
|
|
|
'idx_project_title' => array('columns' => 'title'),
|
2013-10-10 02:01:06 +02:00
|
|
|
);
|
2013-05-16 16:40:40 +02:00
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public $foreignKeys = array(
|
|
|
|
);
|
2013-05-16 16:40:40 +02:00
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Get the value of Id / id.
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function getId()
|
|
|
|
{
|
2014-04-30 15:14:23 +02:00
|
|
|
$rtn = $this->data['id'];
|
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Get the value of Title / title.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function getTitle()
|
|
|
|
{
|
2014-04-30 15:14:23 +02:00
|
|
|
$rtn = $this->data['title'];
|
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Get the value of Reference / reference.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function getReference()
|
|
|
|
{
|
2014-04-30 15:14:23 +02:00
|
|
|
$rtn = $this->data['reference'];
|
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-05-13 17:15:06 +02:00
|
|
|
* Get the value of SshPrivateKey / ssh_private_key.
|
2014-04-30 15:14:23 +02:00
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2014-05-13 17:15:06 +02:00
|
|
|
public function getSshPrivateKey()
|
2013-05-16 16:40:40 +02:00
|
|
|
{
|
2014-05-13 17:15:06 +02:00
|
|
|
$rtn = $this->data['ssh_private_key'];
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2014-03-15 06:18:12 +01:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-05-13 17:15:06 +02:00
|
|
|
* Get the value of SshPublicKey / ssh_public_key.
|
2014-04-30 15:14:23 +02:00
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2014-05-13 17:15:06 +02:00
|
|
|
public function getSshPublicKey()
|
2014-03-15 06:18:12 +01:00
|
|
|
{
|
2014-05-13 17:15:06 +02:00
|
|
|
$rtn = $this->data['ssh_public_key'];
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Get the value of Type / type.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function getType()
|
|
|
|
{
|
2014-04-30 15:14:23 +02:00
|
|
|
$rtn = $this->data['type'];
|
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
2013-10-08 08:21:46 +02:00
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Get the value of AccessInformation / access_information.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2014-02-25 17:43:06 +01:00
|
|
|
public function getAccessInformation()
|
2013-10-08 08:21:46 +02:00
|
|
|
{
|
2014-04-30 15:14:23 +02:00
|
|
|
$rtn = $this->data['access_information'];
|
|
|
|
|
2013-10-08 08:21:46 +02:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
2013-11-18 22:49:18 +01:00
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Get the value of LastCommit / last_commit.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
2013-11-18 22:49:18 +01:00
|
|
|
public function getLastCommit()
|
|
|
|
{
|
2014-04-30 15:14:23 +02:00
|
|
|
$rtn = $this->data['last_commit'];
|
|
|
|
|
2013-11-18 22:49:18 +01:00
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Get the value of BuildConfig / build_config.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getBuildConfig()
|
|
|
|
{
|
|
|
|
$rtn = $this->data['build_config'];
|
|
|
|
|
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
2014-04-30 16:00:35 +02:00
|
|
|
/**
|
|
|
|
* Get the value of AllowPublicStatus / allow_public_status.
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getAllowPublicStatus()
|
|
|
|
{
|
|
|
|
$rtn = $this->data['allow_public_status'];
|
|
|
|
|
|
|
|
return $rtn;
|
|
|
|
}
|
|
|
|
|
2014-04-30 15:14:23 +02:00
|
|
|
/**
|
|
|
|
* Set the value of Id / id.
|
|
|
|
*
|
|
|
|
* Must not be null.
|
|
|
|
* @param $value int
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function setId($value)
|
|
|
|
{
|
|
|
|
$this->_validateNotNull('Id', $value);
|
|
|
|
$this->_validateInt('Id', $value);
|
2013-10-10 02:01:06 +02:00
|
|
|
|
2013-10-08 08:45:20 +02:00
|
|
|
if ($this->data['id'] === $value) {
|
2013-05-16 16:40:40 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:53:00 +02:00
|
|
|
$this->data['id'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
$this->_setModified('id');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Set the value of Title / title.
|
|
|
|
*
|
|
|
|
* Must not be null.
|
|
|
|
* @param $value string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function setTitle($value)
|
|
|
|
{
|
|
|
|
$this->_validateNotNull('Title', $value);
|
|
|
|
$this->_validateString('Title', $value);
|
2013-10-10 02:01:06 +02:00
|
|
|
|
2013-10-08 08:45:20 +02:00
|
|
|
if ($this->data['title'] === $value) {
|
2013-05-16 16:40:40 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:53:00 +02:00
|
|
|
$this->data['title'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
$this->_setModified('title');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Set the value of Reference / reference.
|
|
|
|
*
|
|
|
|
* Must not be null.
|
|
|
|
* @param $value string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function setReference($value)
|
|
|
|
{
|
|
|
|
$this->_validateNotNull('Reference', $value);
|
|
|
|
$this->_validateString('Reference', $value);
|
2013-10-10 02:01:06 +02:00
|
|
|
|
2013-10-08 08:45:20 +02:00
|
|
|
if ($this->data['reference'] === $value) {
|
2013-05-16 16:40:40 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:53:00 +02:00
|
|
|
$this->data['reference'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
$this->_setModified('reference');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-05-13 17:15:06 +02:00
|
|
|
* Set the value of SshPrivateKey / ssh_private_key.
|
2014-04-30 15:14:23 +02:00
|
|
|
*
|
|
|
|
* @param $value string
|
|
|
|
*/
|
2014-05-13 17:15:06 +02:00
|
|
|
public function setSshPrivateKey($value)
|
2013-05-16 16:40:40 +02:00
|
|
|
{
|
2014-05-13 17:15:06 +02:00
|
|
|
$this->_validateString('SshPrivateKey', $value);
|
2013-10-10 02:01:06 +02:00
|
|
|
|
2014-05-13 17:15:06 +02:00
|
|
|
if ($this->data['ssh_private_key'] === $value) {
|
2013-05-16 16:40:40 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2014-05-13 17:15:06 +02:00
|
|
|
$this->data['ssh_private_key'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2014-05-13 17:15:06 +02:00
|
|
|
$this->_setModified('ssh_private_key');
|
2013-05-16 16:40:40 +02:00
|
|
|
}
|
|
|
|
|
2014-03-15 06:18:12 +01:00
|
|
|
/**
|
2014-05-13 17:15:06 +02:00
|
|
|
* Set the value of SshPublicKey / ssh_public_key.
|
2014-04-30 15:14:23 +02:00
|
|
|
*
|
|
|
|
* @param $value string
|
|
|
|
*/
|
2014-05-13 17:15:06 +02:00
|
|
|
public function setSshPublicKey($value)
|
2014-03-15 06:18:12 +01:00
|
|
|
{
|
2014-05-13 17:15:06 +02:00
|
|
|
$this->_validateString('SshPublicKey', $value);
|
2014-03-15 06:18:12 +01:00
|
|
|
|
2014-05-13 17:15:06 +02:00
|
|
|
if ($this->data['ssh_public_key'] === $value) {
|
2014-03-15 06:18:12 +01:00
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2014-05-13 17:15:06 +02:00
|
|
|
$this->data['ssh_public_key'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2014-05-13 17:15:06 +02:00
|
|
|
$this->_setModified('ssh_public_key');
|
2014-03-15 06:18:12 +01:00
|
|
|
}
|
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Set the value of Type / type.
|
|
|
|
*
|
|
|
|
* Must not be null.
|
|
|
|
* @param $value string
|
|
|
|
*/
|
2013-05-16 16:40:40 +02:00
|
|
|
public function setType($value)
|
|
|
|
{
|
|
|
|
$this->_validateNotNull('Type', $value);
|
|
|
|
$this->_validateString('Type', $value);
|
2013-10-10 02:01:06 +02:00
|
|
|
|
2013-10-08 08:45:20 +02:00
|
|
|
if ($this->data['type'] === $value) {
|
2013-05-16 16:40:40 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:53:00 +02:00
|
|
|
$this->data['type'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
$this->_setModified('type');
|
|
|
|
}
|
|
|
|
|
2013-10-08 08:21:46 +02:00
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Set the value of AccessInformation / access_information.
|
|
|
|
*
|
|
|
|
* @param $value string
|
|
|
|
*/
|
2013-10-08 08:21:46 +02:00
|
|
|
public function setAccessInformation($value)
|
|
|
|
{
|
|
|
|
$this->_validateString('AccessInformation', $value);
|
2013-10-10 02:01:06 +02:00
|
|
|
|
2013-10-08 08:45:20 +02:00
|
|
|
if ($this->data['access_information'] === $value) {
|
2013-10-08 08:21:46 +02:00
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-10-08 08:21:46 +02:00
|
|
|
$this->data['access_information'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-10-08 08:21:46 +02:00
|
|
|
$this->_setModified('access_information');
|
|
|
|
}
|
|
|
|
|
2013-11-18 22:49:18 +01:00
|
|
|
/**
|
2014-04-30 15:14:23 +02:00
|
|
|
* Set the value of LastCommit / last_commit.
|
|
|
|
*
|
|
|
|
* @param $value string
|
|
|
|
*/
|
2013-11-18 22:49:18 +01:00
|
|
|
public function setLastCommit($value)
|
|
|
|
{
|
|
|
|
$this->_validateString('LastCommit', $value);
|
|
|
|
|
|
|
|
if ($this->data['last_commit'] === $value) {
|
|
|
|
return;
|
|
|
|
}
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-11-18 22:49:18 +01:00
|
|
|
$this->data['last_commit'] = $value;
|
2014-04-30 15:14:23 +02:00
|
|
|
|
2013-11-18 22:49:18 +01:00
|
|
|
$this->_setModified('last_commit');
|
|
|
|
}
|
|
|
|
|
2014-04-30 15:14:23 +02:00
|
|
|
/**
|
|
|
|
* 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');
|
|
|
|
}
|
|
|
|
|
2014-04-30 16:00:35 +02:00
|
|
|
/**
|
|
|
|
* Set the value of AllowPublicStatus / allow_public_status.
|
|
|
|
*
|
|
|
|
* Must not be null.
|
|
|
|
* @param $value int
|
|
|
|
*/
|
|
|
|
public function setAllowPublicStatus($value)
|
|
|
|
{
|
|
|
|
$this->_validateNotNull('AllowPublicStatus', $value);
|
|
|
|
$this->_validateInt('AllowPublicStatus', $value);
|
|
|
|
|
|
|
|
if ($this->data['allow_public_status'] === $value) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->data['allow_public_status'] = $value;
|
|
|
|
|
|
|
|
$this->_setModified('allow_public_status');
|
|
|
|
}
|
|
|
|
|
2013-05-16 16:40:40 +02:00
|
|
|
/**
|
|
|
|
* Get Build models by ProjectId for this Project.
|
|
|
|
*
|
|
|
|
* @uses \PHPCI\Store\BuildStore::getByProjectId()
|
|
|
|
* @uses \PHPCI\Model\Build
|
|
|
|
* @return \PHPCI\Model\Build[]
|
|
|
|
*/
|
|
|
|
public function getProjectBuilds()
|
|
|
|
{
|
2014-02-25 17:43:06 +01:00
|
|
|
return Factory::getStore('Build', 'PHPCI')->getByProjectId($this->getId());
|
|
|
|
}
|
2014-05-13 17:15:06 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get BuildMeta models by ProjectId for this Project.
|
|
|
|
*
|
|
|
|
* @uses \PHPCI\Store\BuildMetaStore::getByProjectId()
|
|
|
|
* @uses \PHPCI\Model\BuildMeta
|
|
|
|
* @return \PHPCI\Model\BuildMeta[]
|
|
|
|
*/
|
|
|
|
public function getProjectBuildMetas()
|
|
|
|
{
|
|
|
|
return Factory::getStore('BuildMeta', 'PHPCI')->getByProjectId($this->getId());
|
|
|
|
}
|
2013-05-03 17:02:53 +02:00
|
|
|
}
|