프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 |