Свойство | Тип | Описание | |
---|---|---|---|
$accountId | integer | Account Id | |
$added | DateTime | Added time | |
$changed | string | Last change time TODO: convert to DateTime with MySQL 5.6 | |
$changedById | integer | Last editor Id | |
$comments | string | Comments | |
$createdByEmail | string | Creator E-Mail | |
$envId | integer | Environment Id | |
$hash | string | Hash | |
$id | integer | Identifier | |
$isCompleted | boolean | Completion status | |
$launchOrder | boolean | Launch order type | |
$launched | DateTime | Launched time | |
$name | string | Farm name | |
$ownerId | integer | Creator Id | |
$region | string | Region name | |
$status | integer | Status | |
$termOnSyncFail | boolean | Synchronization fail flag |
Свойство | Тип | Описание | |
---|---|---|---|
$_environment | |||
$_farmRoles | Farm roles collection | ||
$_servers | Servers collection | ||
$_settings | Farm settings collection | ||
$_teams | The Farm teams | ||
$_teamsChanged | boolean | True value indicates that the set of the Teams associated with the Farm has been changed within the object with respect to database. |
Метод | Описание | |
---|---|---|
__clone ( ) | Reset farm id on clone | |
__get ( string $name ) : mixed | Magic getter. | |
appendTeams ( |
Appends Teams list | |
checkLocked ( ) | Checks if farm is locked | |
cloneFarm ( string $name, |
Creates clone for the farm TODO: refactor farms cloning | |
delete ( ) | ||
deleteScheduled ( ) | Delete scheduled tasks | |
findWithTeams ( array $criteria = null, array $group = null, array $order = null, integer $limit = null, integer $offset = null, boolean $countRecords = null ) : |
Searches farms by criteria and selecting and initiating their Teams | |
getEnvironment ( ) : |
Return Environment entity | |
getStatusName ( integer $status ) : string | Translates status codes to status names | |
getTeams ( ) : |
Gets the list of the Teams which own the Farm | |
getUserTeamOwnershipSql ( integer $userId, integer $farmId = null ) : string | Generate SQL query like "EXISTS(SELECT 1 FROM farm_teams . | |
hasAccessPermissions ( |
||
hasUserTeamOwnership ( |
Check if given user belongs to team, which has access to farm | |
isTeamsChanged ( ) : boolean | Checks whether the set of the Teams associated with the Farm has been changed. | |
launch ( |
Launch this farm | |
lock ( |
Locks this farm | |
save ( ) | ||
saveTeams ( |
Associates a Farm with specified Teams. | |
setTeams ( |
Sets the list of the Teams which own the Farm | |
unlock ( |
Unlocks this farm |
public appendTeams ( |
||
$team | The Team entity | |
Результат |
public static findWithTeams ( array $criteria = null, array $group = null, array $order = null, integer $limit = null, integer $offset = null, boolean $countRecords = null ) : |
||
$criteria | array | optional The search criteria. |
$group | array | optional The group by looks like [property1, ...], by default groups by `id` |
$order | array | optional The results order looks like [property1 => true|false, ... ] |
$limit | integer | optional The records limit |
$offset | integer | optional The offset |
$countRecords | boolean | optional True to calculate total number of the records without limit |
Результат | Returns collection of the entities. |
public getEnvironment ( ) : |
||
Результат |
public static getStatusName ( integer $status ) : string | ||
$status | integer | Status code |
Результат | string | Status name |
public getTeams ( ) : |
||
Результат |
public hasAccessPermissions ( |
||
$user | The User Entity | |
$environment | optional The Environment Entity | |
$modify | string | boolean | optional ACL Permission Identifier or boolean flag whether it should check modify permissions or not. |
Результат | boolean |
public hasUserTeamOwnership ( |
||
$user | User entity | |
Результат | boolean |
public isTeamsChanged ( ) : boolean | ||
Результат | boolean | Returns true if the set of the Teams that is associated with the Farm has been changed |
public lock ( |
||
$user | The User on whose behalf the lock set | |
$comment | string | Comment describing the reason and/or purpose of the lock |
$restrict | boolean | optional Strict lock flag (I have no idea what that means [author's note]) |
Результат |
public saveTeams ( |
||
$teams | Collection of the Teams |
public setTeams ( |
||
$teams | The list of the Teams that which own the Farm |
public unlock ( |
||
$user | The User on whose behalf the lock unset | |
Результат |
protected Environment,Scalr\Model\Entity\Account $_environment | ||
Результат |
protected EntityIterator,Scalr\Model\Collections|FarmRole[],Scalr\Model\Entity $_farmRoles | ||
Результат |
protected EntityIterator,Scalr\Model\Collections|Server[],Scalr\Model\Entity $_servers | ||
Результат |
protected SettingsCollection,Scalr\Model\Collections $_settings | ||
Результат |
protected EntityIterator,Scalr\Model\Collections|Team[],Scalr\Model\Entity\Account $_teams | ||
Результат |
protected bool $_teamsChanged | ||
Результат | boolean |
public string $changed | ||
Результат | string |
public bool $termOnSyncFail | ||
Результат | boolean |