PHP 클래스 Scalr\Model\Entity\Account\User

부터: 5.4.0 (21.02.2015)
저자: Vitaliy Demidov ([email protected])
상속: extends Scalr\Model\AbstractEntity
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$accountId integer Identifier of the account which User corresponds to
$comments string The comments
$created DateTime The timestamp when the record is created
$email string The email address of the user
$fullName string The full name of the User
$id integer The identifier of the User
$lastLogin DateTime The last timemestamp when the User signed in
$loginAttempts integer The number of failed sign-in attempts
$password string The password
$status string The status of the User
$type string The type

공개 메소드들

메소드 설명
__construct ( ) Constructor
applyLdapGroups ( $groups ) Special method for LDAP auth sync LDAP groups to Scalr groups
canEditUser ( User $user ) : boolean Checks whether the user is allowed to edit specified user
canManageAcl ( ) : boolean Checks whether the user is allowed to manage ACL
canRemoveUser ( User $user ) : boolean Checks whether the user is allowed to remove specified user
fetchSettings ( ) : array Fetches all settings from the database
getAccount ( ) : Client Gets account entity
getAccountId ( ) : integer Gets Identifier of the Account
getAclRoles ( boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition Gets account level roles
getAclRolesByEnvironment ( integer $envId, boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition Gets roles by specified identifier of the Environment
getEmail ( ) : string Gets email address of the User
getEnvironments ( string $filter = null ) : array Gets environments of the current user filtered by name
getId ( ) : integer Gets Identifier of the User
getLdapUsername ( ) : string Gets LDAP username of the User
getSetting ( string $name, boolean $useCache = true ) : string | null Gets specified setting
getTeams ( ) : array Gets user teams
hasAccessToEnvironment ( integer $envId ) : boolean Checks whether this user has access to the specified environment
inTeam ( integer $teamId ) : boolean Check if user is included in team
isAccountAdmin ( ) : boolean Checks if the user is account admin
isAccountOwner ( ) : boolean Checks if the user is account owher
isAccountSuperAdmin ( ) : boolean Checks if the user is account admin
isAdmin ( ) : boolean Checks if the user is admin user (scalr, financial). It means user doesn't have current environment
isFinAdmin ( ) : boolean Checks if the user is Financial admin
isScalrAdmin ( ) : boolean Checks if the user is Scalr admin
isTeamUser ( ) : boolean Checks if the user is team user
isUser ( ) : boolean Checks if the user is account user (owner, admin, team user)
saveSetting ( string $name, string $value ) : User Saves the value of the specified setting to the database
setSetting ( string $name, string $value ) : User Sets the value of the specified setting

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

applyLdapGroups() 공개 메소드

Special method for LDAP auth sync LDAP groups to Scalr groups
public applyLdapGroups ( $groups )
$groups

canEditUser() 공개 메소드

Checks whether the user is allowed to edit specified user
public canEditUser ( User $user ) : boolean
$user User The user to edit
리턴 boolean Returns true if the user is allowed to edit specified user

canManageAcl() 공개 메소드

Checks whether the user is allowed to manage ACL
public canManageAcl ( ) : boolean
리턴 boolean Returns true if user is allowed to manage ACL

canRemoveUser() 공개 메소드

Checks whether the user is allowed to remove specified user
public canRemoveUser ( User $user ) : boolean
$user User The user to remove
리턴 boolean Returns true if the user is allowed to remove specified user

fetchSettings() 공개 메소드

Fetches all settings from the database
public fetchSettings ( ) : array
리턴 array Returns all settings

getAccount() 공개 메소드

Gets account entity
public getAccount ( ) : Client
리턴 Scalr\Model\Entity\Client

getAccountId() 공개 메소드

Gets Identifier of the Account
public getAccountId ( ) : integer
리턴 integer Returns identifier of the Account

getAclRoles() 공개 메소드

Gets account level roles
public getAclRoles ( boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition
$ignoreCache boolean Whether it shoud ignore cache
리턴 Scalr\Acl\Role\AccountRoleSuperposition Returns the list of the roles of account level

getAclRolesByEnvironment() 공개 메소드

Gets roles by specified identifier of the Environment
public getAclRolesByEnvironment ( integer $envId, boolean $ignoreCache = false ) : Scalr\Acl\Role\AccountRoleSuperposition
$envId integer The identifier of the Environment
$ignoreCache boolean optional Whether it should ignore cache
리턴 Scalr\Acl\Role\AccountRoleSuperposition Returns the list of the roles of account level by specified environment

getEmail() 공개 메소드

Gets email address of the User
public getEmail ( ) : string
리턴 string Returns user email address

getEnvironments() 공개 메소드

Gets environments of the current user filtered by name
public getEnvironments ( string $filter = null ) : array
$filter string optional Filter string
리턴 array

getId() 공개 메소드

Gets Identifier of the User
public getId ( ) : integer
리턴 integer Returns identifier of the User

getLdapUsername() 공개 메소드

Gets LDAP username of the User
public getLdapUsername ( ) : string
리턴 string Returns LDAP username

getSetting() 공개 메소드

Gets specified setting
public getSetting ( string $name, boolean $useCache = true ) : string | null
$name string The name of the setting
$useCache boolean optional Whether it should use cache
리턴 string | null Returns the value on success or NULL if it does not exist.

getTeams() 공개 메소드

Gets user teams
public getTeams ( ) : array
리턴 array

hasAccessToEnvironment() 공개 메소드

Checks whether this user has access to the specified environment
public hasAccessToEnvironment ( integer $envId ) : boolean
$envId integer The identifier of the environment
리턴 boolean Returns TRUE if the user has access to the specified environment

inTeam() 공개 메소드

Check if user is included in team
public inTeam ( integer $teamId ) : boolean
$teamId integer
리턴 boolean

isAccountAdmin() 공개 메소드

Checks if the user is account admin
public isAccountAdmin ( ) : boolean
리턴 boolean Returns true if user is account admin

isAccountOwner() 공개 메소드

Checks if the user is account owher
public isAccountOwner ( ) : boolean
리턴 boolean Returns true if user is account owner.

isAccountSuperAdmin() 공개 메소드

Checks if the user is account admin
public isAccountSuperAdmin ( ) : boolean
리턴 boolean Returns true if user is account super admin

isAdmin() 공개 메소드

Checks if the user is admin user (scalr, financial). It means user doesn't have current environment
public isAdmin ( ) : boolean
리턴 boolean

isFinAdmin() 공개 메소드

Checks if the user is Financial admin
public isFinAdmin ( ) : boolean
리턴 boolean Returns true if user is Financial Admin

isScalrAdmin() 공개 메소드

Checks if the user is Scalr admin
public isScalrAdmin ( ) : boolean
리턴 boolean Returns true if user is Scalr Admin

isTeamUser() 공개 메소드

Checks if the user is team user
public isTeamUser ( ) : boolean
리턴 boolean Returns true if user is team user

isUser() 공개 메소드

Checks if the user is account user (owner, admin, team user)
public isUser ( ) : boolean
리턴 boolean

saveSetting() 공개 메소드

Saves the value of the specified setting to the database
public saveSetting ( string $name, string $value ) : User
$name string The name of the setting
$value string The value
리턴 User

setSetting() 공개 메소드

Sets the value of the specified setting
public setSetting ( string $name, string $value ) : User
$name string The name of the setting
$value string The value
리턴 User

프로퍼티 상세

$accountId 공개적으로 프로퍼티

Identifier of the account which User corresponds to
public int $accountId
리턴 integer

$comments 공개적으로 프로퍼티

The comments
public string $comments
리턴 string

$created 공개적으로 프로퍼티

The timestamp when the record is created
public DateTime $created
리턴 DateTime

$email 공개적으로 프로퍼티

The email address of the user
public string $email
리턴 string

$fullName 공개적으로 프로퍼티

The full name of the User
public string $fullName
리턴 string

$id 공개적으로 프로퍼티

The identifier of the User
public int $id
리턴 integer

$lastLogin 공개적으로 프로퍼티

The last timemestamp when the User signed in
public DateTime $lastLogin
리턴 DateTime

$loginAttempts 공개적으로 프로퍼티

The number of failed sign-in attempts
public int $loginAttempts
리턴 integer

$password 공개적으로 프로퍼티

The password
public string $password
리턴 string

$status 공개적으로 프로퍼티

The status of the User
public string $status
리턴 string

$type 공개적으로 프로퍼티

The type
public string $type
리턴 string