Updating base models to ones generated by the new b8framework generator. Now include strict typing, proper commenting and better formatting. Fixes #13
This commit is contained in:
parent
20bb2e7a10
commit
505b0c0563
|
@ -12,144 +12,146 @@ use b8\Model;
|
||||||
*/
|
*/
|
||||||
class BuildBase extends Model
|
class BuildBase extends Model
|
||||||
{
|
{
|
||||||
public static $sleepable= array();
|
/**
|
||||||
protected $_tableName = 'build';
|
* @var array
|
||||||
protected $_modelName = 'Build';
|
*/
|
||||||
protected $_data = array(
|
public static $sleepable = array();
|
||||||
'id' => null,
|
|
||||||
'project_id' => null,
|
|
||||||
'commit_id' => null,
|
|
||||||
'status' => null,
|
|
||||||
'log' => null,
|
|
||||||
'branch' => null,
|
|
||||||
'created' => null,
|
|
||||||
'started' => null,
|
|
||||||
'finished' => null,
|
|
||||||
'plugins' => null,
|
|
||||||
);
|
|
||||||
protected $_getters = array(
|
|
||||||
'id' => 'getId',
|
|
||||||
'project_id' => 'getProjectId',
|
|
||||||
'commit_id' => 'getCommitId',
|
|
||||||
'status' => 'getStatus',
|
|
||||||
'log' => 'getLog',
|
|
||||||
'branch' => 'getBranch',
|
|
||||||
'created' => 'getCreated',
|
|
||||||
'started' => 'getStarted',
|
|
||||||
'finished' => 'getFinished',
|
|
||||||
'plugins' => 'getPlugins',
|
|
||||||
|
|
||||||
'Project' => 'getProject',
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_tableName = 'build';
|
||||||
|
|
||||||
);
|
/**
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $_modelName = 'Build';
|
||||||
|
|
||||||
protected $_setters = array(
|
/**
|
||||||
'id' => 'setId',
|
* @var array
|
||||||
'project_id' => 'setProjectId',
|
*/
|
||||||
'commit_id' => 'setCommitId',
|
protected $_data = array(
|
||||||
'status' => 'setStatus',
|
'id' => null,
|
||||||
'log' => 'setLog',
|
'project_id' => null,
|
||||||
'branch' => 'setBranch',
|
'commit_id' => null,
|
||||||
'created' => 'setCreated',
|
'status' => null,
|
||||||
'started' => 'setStarted',
|
'log' => null,
|
||||||
'finished' => 'setFinished',
|
'branch' => null,
|
||||||
'plugins' => 'setPlugins',
|
'created' => null,
|
||||||
|
'started' => null,
|
||||||
|
'finished' => null,
|
||||||
|
'plugins' => null,
|
||||||
|
);
|
||||||
|
|
||||||
'Project' => 'setProject',
|
/**
|
||||||
);
|
* @var array
|
||||||
public $columns = array(
|
*/
|
||||||
'id' => array(
|
protected $_getters = array(
|
||||||
'type' => 'int',
|
'id' => 'getId',
|
||||||
'length' => '11',
|
'project_id' => 'getProjectId',
|
||||||
|
'commit_id' => 'getCommitId',
|
||||||
|
'status' => 'getStatus',
|
||||||
|
'log' => 'getLog',
|
||||||
|
'branch' => 'getBranch',
|
||||||
|
'created' => 'getCreated',
|
||||||
|
'started' => 'getStarted',
|
||||||
|
'finished' => 'getFinished',
|
||||||
|
'plugins' => 'getPlugins',
|
||||||
|
'Project' => 'getProject',
|
||||||
|
);
|
||||||
|
|
||||||
'primary_key' => true,
|
/**
|
||||||
'auto_increment' => true,
|
* @var array
|
||||||
|
*/
|
||||||
),
|
protected $_setters = array(
|
||||||
'project_id' => array(
|
'id' => 'setId',
|
||||||
'type' => 'int',
|
'project_id' => 'setProjectId',
|
||||||
'length' => '11',
|
'commit_id' => 'setCommitId',
|
||||||
|
'status' => 'setStatus',
|
||||||
|
'log' => 'setLog',
|
||||||
|
'branch' => 'setBranch',
|
||||||
|
'created' => 'setCreated',
|
||||||
),
|
'started' => 'setStarted',
|
||||||
'commit_id' => array(
|
'finished' => 'setFinished',
|
||||||
'type' => 'varchar',
|
'plugins' => 'setPlugins',
|
||||||
'length' => '50',
|
'Project' => 'setProject',
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
'status' => array(
|
|
||||||
'type' => 'tinyint',
|
|
||||||
'length' => '4',
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
'log' => array(
|
|
||||||
'type' => 'text',
|
|
||||||
'length' => '',
|
|
||||||
'nullable' => true,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
'branch' => array(
|
|
||||||
'type' => 'varchar',
|
|
||||||
'length' => '50',
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
'created' => array(
|
|
||||||
'type' => 'datetime',
|
|
||||||
'length' => '',
|
|
||||||
'nullable' => true,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
'started' => array(
|
|
||||||
'type' => 'datetime',
|
|
||||||
'length' => '',
|
|
||||||
'nullable' => true,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
'finished' => array(
|
|
||||||
'type' => 'datetime',
|
|
||||||
'length' => '',
|
|
||||||
'nullable' => true,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
'plugins' => array(
|
|
||||||
'type' => 'text',
|
|
||||||
'length' => '',
|
|
||||||
'nullable' => true,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
),
|
|
||||||
);
|
|
||||||
public $indexes = array(
|
|
||||||
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
|
||||||
'project_id' => array('columns' => 'project_id'),
|
|
||||||
'idx_status' => array('columns' => 'status'),
|
|
||||||
);
|
|
||||||
public $foreignKeys = array(
|
|
||||||
'build_ibfk_1' => array('local_col' => 'project_id', 'update' => 'CASCADE', 'delete' => 'CASCADE', 'table' => 'project', 'col' => 'id'),
|
|
||||||
);
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $columns = array(
|
||||||
|
'id' => array(
|
||||||
|
'type' => 'int',
|
||||||
|
'length' => '11',
|
||||||
|
'primary_key' => true,
|
||||||
|
'auto_increment' => true,
|
||||||
|
),
|
||||||
|
'project_id' => array(
|
||||||
|
'type' => 'int',
|
||||||
|
'length' => '11',
|
||||||
|
),
|
||||||
|
'commit_id' => array(
|
||||||
|
'type' => 'varchar',
|
||||||
|
'length' => '50',
|
||||||
|
),
|
||||||
|
'status' => array(
|
||||||
|
'type' => 'tinyint',
|
||||||
|
'length' => '4',
|
||||||
|
),
|
||||||
|
'log' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'length' => '',
|
||||||
|
'nullable' => true,
|
||||||
|
),
|
||||||
|
'branch' => array(
|
||||||
|
'type' => 'varchar',
|
||||||
|
'length' => '50',
|
||||||
|
),
|
||||||
|
'created' => array(
|
||||||
|
'type' => 'datetime',
|
||||||
|
'length' => '',
|
||||||
|
'nullable' => true,
|
||||||
|
),
|
||||||
|
'started' => array(
|
||||||
|
'type' => 'datetime',
|
||||||
|
'length' => '',
|
||||||
|
'nullable' => true,
|
||||||
|
),
|
||||||
|
'finished' => array(
|
||||||
|
'type' => 'datetime',
|
||||||
|
'length' => '',
|
||||||
|
'nullable' => true,
|
||||||
|
),
|
||||||
|
'plugins' => array(
|
||||||
|
'type' => 'text',
|
||||||
|
'length' => '',
|
||||||
|
'nullable' => true,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $indexes = array(
|
||||||
|
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
||||||
|
'project_id' => array('columns' => 'project_id'),
|
||||||
|
'idx_status' => array('columns' => 'status'),
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $foreignKeys = array(
|
||||||
|
'build_ibfk_1' => array('local_col' => 'project_id', 'update' => 'CASCADE', 'delete' => 'CASCADE', 'table' => 'project', 'col' => 'id'),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Id / id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function getId()
|
public function getId()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['id'];
|
$rtn = $this->_data['id'];
|
||||||
|
@ -158,6 +160,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of ProjectId / project_id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function getProjectId()
|
public function getProjectId()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['project_id'];
|
$rtn = $this->_data['project_id'];
|
||||||
|
@ -166,6 +173,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of CommitId / commit_id.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getCommitId()
|
public function getCommitId()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['commit_id'];
|
$rtn = $this->_data['commit_id'];
|
||||||
|
@ -174,6 +186,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Status / status.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function getStatus()
|
public function getStatus()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['status'];
|
$rtn = $this->_data['status'];
|
||||||
|
@ -182,6 +199,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Log / log.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getLog()
|
public function getLog()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['log'];
|
$rtn = $this->_data['log'];
|
||||||
|
@ -190,6 +212,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Branch / branch.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getBranch()
|
public function getBranch()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['branch'];
|
$rtn = $this->_data['branch'];
|
||||||
|
@ -198,6 +225,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Created / created.
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
public function getCreated()
|
public function getCreated()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['created'];
|
$rtn = $this->_data['created'];
|
||||||
|
@ -212,6 +244,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Started / started.
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
public function getStarted()
|
public function getStarted()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['started'];
|
$rtn = $this->_data['started'];
|
||||||
|
@ -226,6 +263,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Finished / finished.
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*/
|
||||||
public function getFinished()
|
public function getFinished()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['finished'];
|
$rtn = $this->_data['finished'];
|
||||||
|
@ -240,6 +282,11 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Plugins / plugins.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getPlugins()
|
public function getPlugins()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['plugins'];
|
$rtn = $this->_data['plugins'];
|
||||||
|
@ -248,13 +295,17 @@ class BuildBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Id / id.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value int
|
||||||
|
*/
|
||||||
public function setId($value)
|
public function setId($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Id', $value);
|
$this->_validateNotNull('Id', $value);
|
||||||
$this->_validateInt('Id', $value);
|
$this->_validateInt('Id', $value);
|
||||||
if($this->_data['id'] == $value)
|
if($this->_data['id'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -264,11 +315,17 @@ class BuildBase extends Model
|
||||||
$this->_setModified('id');
|
$this->_setModified('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of ProjectId / project_id.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value int
|
||||||
|
*/
|
||||||
public function setProjectId($value)
|
public function setProjectId($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('ProjectId', $value);
|
$this->_validateNotNull('ProjectId', $value);
|
||||||
$this->_validateInt('ProjectId', $value);
|
$this->_validateInt('ProjectId', $value);
|
||||||
if($this->_data['project_id'] == $value)
|
if($this->_data['project_id'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -278,11 +335,17 @@ class BuildBase extends Model
|
||||||
$this->_setModified('project_id');
|
$this->_setModified('project_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of CommitId / commit_id.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setCommitId($value)
|
public function setCommitId($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('CommitId', $value);
|
$this->_validateNotNull('CommitId', $value);
|
||||||
$this->_validateString('CommitId', $value);
|
$this->_validateString('CommitId', $value);
|
||||||
if($this->_data['commit_id'] == $value)
|
if($this->_data['commit_id'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -292,11 +355,17 @@ class BuildBase extends Model
|
||||||
$this->_setModified('commit_id');
|
$this->_setModified('commit_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Status / status.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value int
|
||||||
|
*/
|
||||||
public function setStatus($value)
|
public function setStatus($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Status', $value);
|
$this->_validateNotNull('Status', $value);
|
||||||
$this->_validateInt('Status', $value);
|
$this->_validateInt('Status', $value);
|
||||||
if($this->_data['status'] == $value)
|
if($this->_data['status'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -306,11 +375,16 @@ class BuildBase extends Model
|
||||||
$this->_setModified('status');
|
$this->_setModified('status');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Log / log.
|
||||||
|
*
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setLog($value)
|
public function setLog($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->_validateString('Log', $value);
|
$this->_validateString('Log', $value);
|
||||||
if($this->_data['log'] == $value)
|
if($this->_data['log'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -320,11 +394,17 @@ class BuildBase extends Model
|
||||||
$this->_setModified('log');
|
$this->_setModified('log');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Branch / branch.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setBranch($value)
|
public function setBranch($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Branch', $value);
|
$this->_validateNotNull('Branch', $value);
|
||||||
$this->_validateString('Branch', $value);
|
$this->_validateString('Branch', $value);
|
||||||
if($this->_data['branch'] == $value)
|
if($this->_data['branch'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -334,11 +414,16 @@ class BuildBase extends Model
|
||||||
$this->_setModified('branch');
|
$this->_setModified('branch');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Created / created.
|
||||||
|
*
|
||||||
|
* @param $value \DateTime
|
||||||
|
*/
|
||||||
public function setCreated($value)
|
public function setCreated($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->_validateDate('Created', $value);
|
$this->_validateDate('Created', $value);
|
||||||
if($this->_data['created'] == $value)
|
if($this->_data['created'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -348,11 +433,16 @@ class BuildBase extends Model
|
||||||
$this->_setModified('created');
|
$this->_setModified('created');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Started / started.
|
||||||
|
*
|
||||||
|
* @param $value \DateTime
|
||||||
|
*/
|
||||||
public function setStarted($value)
|
public function setStarted($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->_validateDate('Started', $value);
|
$this->_validateDate('Started', $value);
|
||||||
if($this->_data['started'] == $value)
|
if($this->_data['started'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -362,11 +452,16 @@ class BuildBase extends Model
|
||||||
$this->_setModified('started');
|
$this->_setModified('started');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Finished / finished.
|
||||||
|
*
|
||||||
|
* @param $value \DateTime
|
||||||
|
*/
|
||||||
public function setFinished($value)
|
public function setFinished($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->_validateDate('Finished', $value);
|
$this->_validateDate('Finished', $value);
|
||||||
if($this->_data['finished'] == $value)
|
if($this->_data['finished'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -376,11 +471,16 @@ class BuildBase extends Model
|
||||||
$this->_setModified('finished');
|
$this->_setModified('finished');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Plugins / plugins.
|
||||||
|
*
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setPlugins($value)
|
public function setPlugins($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->_validateString('Plugins', $value);
|
$this->_validateString('Plugins', $value);
|
||||||
if($this->_data['plugins'] == $value)
|
if($this->_data['plugins'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -390,8 +490,6 @@ class BuildBase extends Model
|
||||||
$this->_setModified('plugins');
|
$this->_setModified('plugins');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Project model for this Build by Id.
|
* Get the Project model for this Build by Id.
|
||||||
*
|
*
|
||||||
|
@ -408,9 +506,23 @@ class BuildBase extends Model
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return \b8\Store\Factory::getStore('Project')->getById($key);
|
$cacheKey = 'Cache.Project.' . $key;
|
||||||
|
$rtn = $this->registry->get($cacheKey, null);
|
||||||
|
|
||||||
|
if(empty($rtn))
|
||||||
|
{
|
||||||
|
$rtn = \b8\Store\Factory::getStore('Project')->getById($key);
|
||||||
|
$this->registry->set($cacheKey, $rtn);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Project - Accepts an ID, an array representing a Project or a Project model.
|
||||||
|
*
|
||||||
|
* @param $value mixed
|
||||||
|
*/
|
||||||
public function setProject($value)
|
public function setProject($value)
|
||||||
{
|
{
|
||||||
// Is this an instance of Project?
|
// Is this an instance of Project?
|
||||||
|
@ -429,11 +541,14 @@ class BuildBase extends Model
|
||||||
return $this->setProjectId($value);
|
return $this->setProjectId($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Project - Accepts a Project model.
|
||||||
|
*
|
||||||
|
* @param $value \PHPCI\Model\Project
|
||||||
|
*/
|
||||||
public function setProjectObject(\PHPCI\Model\Project $value)
|
public function setProjectObject(\PHPCI\Model\Project $value)
|
||||||
{
|
{
|
||||||
return $this->setProjectId($value->getId());
|
return $this->setProjectId($value->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,95 +12,109 @@ use b8\Model;
|
||||||
*/
|
*/
|
||||||
class ProjectBase extends Model
|
class ProjectBase extends Model
|
||||||
{
|
{
|
||||||
public static $sleepable= array();
|
/**
|
||||||
protected $_tableName = 'project';
|
* @var array
|
||||||
protected $_modelName = 'Project';
|
*/
|
||||||
protected $_data = array(
|
public static $sleepable = array();
|
||||||
'id' => null,
|
|
||||||
'title' => null,
|
/**
|
||||||
'reference' => null,
|
* @var string
|
||||||
'git_key' => null,
|
*/
|
||||||
'type' => null,
|
protected $_tableName = 'project';
|
||||||
'token' => null,
|
|
||||||
);
|
/**
|
||||||
protected $_getters = array(
|
* @var string
|
||||||
'id' => 'getId',
|
*/
|
||||||
'title' => 'getTitle',
|
protected $_modelName = 'Project';
|
||||||
'reference' => 'getReference',
|
|
||||||
'git_key' => 'getGitKey',
|
/**
|
||||||
'type' => 'getType',
|
* @var array
|
||||||
'token' => 'getToken',
|
*/
|
||||||
|
protected $_data = array(
|
||||||
|
'id' => null,
|
||||||
);
|
'title' => null,
|
||||||
|
'reference' => null,
|
||||||
protected $_setters = array(
|
'git_key' => null,
|
||||||
'id' => 'setId',
|
'type' => null,
|
||||||
'title' => 'setTitle',
|
'token' => null,
|
||||||
'reference' => 'setReference',
|
);
|
||||||
'git_key' => 'setGitKey',
|
|
||||||
'type' => 'setType',
|
/**
|
||||||
'token' => 'setToken',
|
* @var array
|
||||||
|
*/
|
||||||
);
|
protected $_getters = array(
|
||||||
public $columns = array(
|
'id' => 'getId',
|
||||||
'id' => array(
|
'title' => 'getTitle',
|
||||||
'type' => 'int',
|
'reference' => 'getReference',
|
||||||
'length' => '11',
|
'git_key' => 'getGitKey',
|
||||||
|
'type' => 'getType',
|
||||||
'primary_key' => true,
|
'token' => 'getToken',
|
||||||
'auto_increment' => true,
|
);
|
||||||
|
|
||||||
),
|
/**
|
||||||
'title' => array(
|
* @var array
|
||||||
'type' => 'varchar',
|
*/
|
||||||
'length' => '250',
|
protected $_setters = array(
|
||||||
|
'id' => 'setId',
|
||||||
|
'title' => 'setTitle',
|
||||||
|
'reference' => 'setReference',
|
||||||
|
'git_key' => 'setGitKey',
|
||||||
),
|
'type' => 'setType',
|
||||||
'reference' => array(
|
'token' => 'setToken',
|
||||||
'type' => 'varchar',
|
);
|
||||||
'length' => '250',
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $columns = array(
|
||||||
),
|
'id' => array(
|
||||||
'git_key' => array(
|
'type' => 'int',
|
||||||
'type' => 'text',
|
'length' => '11',
|
||||||
'length' => '',
|
'primary_key' => true,
|
||||||
|
'auto_increment' => true,
|
||||||
|
),
|
||||||
|
'title' => array(
|
||||||
|
'type' => 'varchar',
|
||||||
),
|
'length' => '250',
|
||||||
'type' => array(
|
),
|
||||||
'type' => 'varchar',
|
'reference' => array(
|
||||||
'length' => '50',
|
'type' => 'varchar',
|
||||||
|
'length' => '250',
|
||||||
|
),
|
||||||
|
'git_key' => array(
|
||||||
|
'type' => 'text',
|
||||||
),
|
'length' => '',
|
||||||
'token' => array(
|
),
|
||||||
'type' => 'varchar',
|
'type' => array(
|
||||||
'length' => '50',
|
'type' => 'varchar',
|
||||||
'nullable' => true,
|
'length' => '50',
|
||||||
|
),
|
||||||
|
'token' => array(
|
||||||
|
'type' => 'varchar',
|
||||||
),
|
'length' => '50',
|
||||||
);
|
'nullable' => true,
|
||||||
public $indexes = array(
|
),
|
||||||
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
);
|
||||||
);
|
|
||||||
public $foreignKeys = array(
|
/**
|
||||||
);
|
* @var array
|
||||||
|
*/
|
||||||
|
public $indexes = array(
|
||||||
|
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $foreignKeys = array(
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Id / id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function getId()
|
public function getId()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['id'];
|
$rtn = $this->_data['id'];
|
||||||
|
@ -109,6 +123,11 @@ class ProjectBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Title / title.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['title'];
|
$rtn = $this->_data['title'];
|
||||||
|
@ -117,6 +136,11 @@ class ProjectBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Reference / reference.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getReference()
|
public function getReference()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['reference'];
|
$rtn = $this->_data['reference'];
|
||||||
|
@ -125,6 +149,11 @@ class ProjectBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of GitKey / git_key.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getGitKey()
|
public function getGitKey()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['git_key'];
|
$rtn = $this->_data['git_key'];
|
||||||
|
@ -133,6 +162,11 @@ class ProjectBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Type / type.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getType()
|
public function getType()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['type'];
|
$rtn = $this->_data['type'];
|
||||||
|
@ -141,6 +175,11 @@ class ProjectBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Token / token.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getToken()
|
public function getToken()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['token'];
|
$rtn = $this->_data['token'];
|
||||||
|
@ -149,13 +188,17 @@ class ProjectBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Id / id.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value int
|
||||||
|
*/
|
||||||
public function setId($value)
|
public function setId($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Id', $value);
|
$this->_validateNotNull('Id', $value);
|
||||||
$this->_validateInt('Id', $value);
|
$this->_validateInt('Id', $value);
|
||||||
if($this->_data['id'] == $value)
|
if($this->_data['id'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -165,11 +208,17 @@ class ProjectBase extends Model
|
||||||
$this->_setModified('id');
|
$this->_setModified('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Title / title.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setTitle($value)
|
public function setTitle($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Title', $value);
|
$this->_validateNotNull('Title', $value);
|
||||||
$this->_validateString('Title', $value);
|
$this->_validateString('Title', $value);
|
||||||
if($this->_data['title'] == $value)
|
if($this->_data['title'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -179,11 +228,17 @@ class ProjectBase extends Model
|
||||||
$this->_setModified('title');
|
$this->_setModified('title');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Reference / reference.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setReference($value)
|
public function setReference($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Reference', $value);
|
$this->_validateNotNull('Reference', $value);
|
||||||
$this->_validateString('Reference', $value);
|
$this->_validateString('Reference', $value);
|
||||||
if($this->_data['reference'] == $value)
|
if($this->_data['reference'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -193,11 +248,17 @@ class ProjectBase extends Model
|
||||||
$this->_setModified('reference');
|
$this->_setModified('reference');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of GitKey / git_key.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setGitKey($value)
|
public function setGitKey($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('GitKey', $value);
|
$this->_validateNotNull('GitKey', $value);
|
||||||
$this->_validateString('GitKey', $value);
|
$this->_validateString('GitKey', $value);
|
||||||
if($this->_data['git_key'] == $value)
|
if($this->_data['git_key'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -207,11 +268,17 @@ class ProjectBase extends Model
|
||||||
$this->_setModified('git_key');
|
$this->_setModified('git_key');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Type / type.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setType($value)
|
public function setType($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Type', $value);
|
$this->_validateNotNull('Type', $value);
|
||||||
$this->_validateString('Type', $value);
|
$this->_validateString('Type', $value);
|
||||||
if($this->_data['type'] == $value)
|
if($this->_data['type'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -221,11 +288,16 @@ class ProjectBase extends Model
|
||||||
$this->_setModified('type');
|
$this->_setModified('type');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Token / token.
|
||||||
|
*
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setToken($value)
|
public function setToken($value)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->_validateString('Token', $value);
|
$this->_validateString('Token', $value);
|
||||||
if($this->_data['token'] == $value)
|
if($this->_data['token'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -235,10 +307,6 @@ class ProjectBase extends Model
|
||||||
$this->_setModified('token');
|
$this->_setModified('token');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Build models by ProjectId for this Project.
|
* Get Build models by ProjectId for this Project.
|
||||||
*
|
*
|
||||||
|
|
|
@ -12,85 +12,102 @@ use b8\Model;
|
||||||
*/
|
*/
|
||||||
class UserBase extends Model
|
class UserBase extends Model
|
||||||
{
|
{
|
||||||
public static $sleepable= array();
|
/**
|
||||||
protected $_tableName = 'user';
|
* @var array
|
||||||
protected $_modelName = 'User';
|
*/
|
||||||
protected $_data = array(
|
public static $sleepable = array();
|
||||||
'id' => null,
|
|
||||||
'email' => null,
|
/**
|
||||||
'hash' => null,
|
* @var string
|
||||||
'is_admin' => null,
|
*/
|
||||||
'name' => null,
|
protected $_tableName = 'user';
|
||||||
);
|
|
||||||
protected $_getters = array(
|
/**
|
||||||
'id' => 'getId',
|
* @var string
|
||||||
'email' => 'getEmail',
|
*/
|
||||||
'hash' => 'getHash',
|
protected $_modelName = 'User';
|
||||||
'is_admin' => 'getIsAdmin',
|
|
||||||
'name' => 'getName',
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
);
|
protected $_data = array(
|
||||||
|
'id' => null,
|
||||||
protected $_setters = array(
|
'email' => null,
|
||||||
'id' => 'setId',
|
'hash' => null,
|
||||||
'email' => 'setEmail',
|
'is_admin' => null,
|
||||||
'hash' => 'setHash',
|
'name' => null,
|
||||||
'is_admin' => 'setIsAdmin',
|
);
|
||||||
'name' => 'setName',
|
|
||||||
|
/**
|
||||||
);
|
* @var array
|
||||||
public $columns = array(
|
*/
|
||||||
'id' => array(
|
protected $_getters = array(
|
||||||
'type' => 'int',
|
'id' => 'getId',
|
||||||
'length' => '11',
|
'email' => 'getEmail',
|
||||||
|
'hash' => 'getHash',
|
||||||
'primary_key' => true,
|
'is_admin' => 'getIsAdmin',
|
||||||
'auto_increment' => true,
|
'name' => 'getName',
|
||||||
|
);
|
||||||
),
|
|
||||||
'email' => array(
|
/**
|
||||||
'type' => 'varchar',
|
* @var array
|
||||||
'length' => '250',
|
*/
|
||||||
|
protected $_setters = array(
|
||||||
|
'id' => 'setId',
|
||||||
|
'email' => 'setEmail',
|
||||||
|
'hash' => 'setHash',
|
||||||
),
|
'is_admin' => 'setIsAdmin',
|
||||||
'hash' => array(
|
'name' => 'setName',
|
||||||
'type' => 'varchar',
|
);
|
||||||
'length' => '250',
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $columns = array(
|
||||||
),
|
'id' => array(
|
||||||
'is_admin' => array(
|
'type' => 'int',
|
||||||
'type' => 'tinyint',
|
'length' => '11',
|
||||||
'length' => '1',
|
'primary_key' => true,
|
||||||
|
'auto_increment' => true,
|
||||||
|
),
|
||||||
|
'email' => array(
|
||||||
|
'type' => 'varchar',
|
||||||
),
|
'length' => '250',
|
||||||
'name' => array(
|
),
|
||||||
'type' => 'varchar',
|
'hash' => array(
|
||||||
'length' => '250',
|
'type' => 'varchar',
|
||||||
|
'length' => '250',
|
||||||
|
),
|
||||||
|
'is_admin' => array(
|
||||||
|
'type' => 'tinyint',
|
||||||
),
|
'length' => '1',
|
||||||
);
|
),
|
||||||
public $indexes = array(
|
'name' => array(
|
||||||
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
'type' => 'varchar',
|
||||||
'idx_email' => array('unique' => true, 'columns' => 'email'),
|
'length' => '250',
|
||||||
);
|
),
|
||||||
public $foreignKeys = array(
|
);
|
||||||
);
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $indexes = array(
|
||||||
|
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
||||||
|
'idx_email' => array('unique' => true, 'columns' => 'email'),
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
public $foreignKeys = array(
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Id / id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function getId()
|
public function getId()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['id'];
|
$rtn = $this->_data['id'];
|
||||||
|
@ -99,6 +116,11 @@ class UserBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Email / email.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getEmail()
|
public function getEmail()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['email'];
|
$rtn = $this->_data['email'];
|
||||||
|
@ -107,6 +129,11 @@ class UserBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Hash / hash.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getHash()
|
public function getHash()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['hash'];
|
$rtn = $this->_data['hash'];
|
||||||
|
@ -115,6 +142,11 @@ class UserBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of IsAdmin / is_admin.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
public function getIsAdmin()
|
public function getIsAdmin()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['is_admin'];
|
$rtn = $this->_data['is_admin'];
|
||||||
|
@ -123,6 +155,11 @@ class UserBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of Name / name.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function getName()
|
public function getName()
|
||||||
{
|
{
|
||||||
$rtn = $this->_data['name'];
|
$rtn = $this->_data['name'];
|
||||||
|
@ -131,13 +168,17 @@ class UserBase extends Model
|
||||||
return $rtn;
|
return $rtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Id / id.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value int
|
||||||
|
*/
|
||||||
public function setId($value)
|
public function setId($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Id', $value);
|
$this->_validateNotNull('Id', $value);
|
||||||
$this->_validateInt('Id', $value);
|
$this->_validateInt('Id', $value);
|
||||||
if($this->_data['id'] == $value)
|
if($this->_data['id'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -147,11 +188,17 @@ class UserBase extends Model
|
||||||
$this->_setModified('id');
|
$this->_setModified('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Email / email.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setEmail($value)
|
public function setEmail($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Email', $value);
|
$this->_validateNotNull('Email', $value);
|
||||||
$this->_validateString('Email', $value);
|
$this->_validateString('Email', $value);
|
||||||
if($this->_data['email'] == $value)
|
if($this->_data['email'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -161,11 +208,17 @@ class UserBase extends Model
|
||||||
$this->_setModified('email');
|
$this->_setModified('email');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Hash / hash.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setHash($value)
|
public function setHash($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Hash', $value);
|
$this->_validateNotNull('Hash', $value);
|
||||||
$this->_validateString('Hash', $value);
|
$this->_validateString('Hash', $value);
|
||||||
if($this->_data['hash'] == $value)
|
if($this->_data['hash'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -175,11 +228,17 @@ class UserBase extends Model
|
||||||
$this->_setModified('hash');
|
$this->_setModified('hash');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of IsAdmin / is_admin.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value int
|
||||||
|
*/
|
||||||
public function setIsAdmin($value)
|
public function setIsAdmin($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('IsAdmin', $value);
|
$this->_validateNotNull('IsAdmin', $value);
|
||||||
$this->_validateInt('IsAdmin', $value);
|
$this->_validateInt('IsAdmin', $value);
|
||||||
if($this->_data['is_admin'] == $value)
|
if($this->_data['is_admin'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -189,11 +248,17 @@ class UserBase extends Model
|
||||||
$this->_setModified('is_admin');
|
$this->_setModified('is_admin');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of Name / name.
|
||||||
|
*
|
||||||
|
* Must not be null.
|
||||||
|
* @param $value string
|
||||||
|
*/
|
||||||
public function setName($value)
|
public function setName($value)
|
||||||
{
|
{
|
||||||
$this->_validateNotNull('Name', $value);
|
$this->_validateNotNull('Name', $value);
|
||||||
$this->_validateString('Name', $value);
|
$this->_validateString('Name', $value);
|
||||||
if($this->_data['name'] == $value)
|
if($this->_data['name'] === $value)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -203,8 +268,4 @@ class UserBase extends Model
|
||||||
$this->_setModified('name');
|
$this->_setModified('name');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue