PHP 클래스 UserType

상속: extends Eloquent
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$m_columnNames
$m_config
$m_dbTableName
$m_exists
$m_keyColumnNames
$m_keyIsAutoIncrement

공개 메소드들

메소드 설명
GetByName ( $p_name ) : mixed Get the user type that matches the given name.
GetUserTypeFromConfig ( $p_configVars ) : mixed Get the user type that matches the given config variables.
GetUserTypes ( ) : array Get all the user types with the exception of those with the Reader permission.
UserType ( $p_userTypeId = null ) : void Constructor
create ( $p_name = null, $p_configVars = [] ) : boolean Create the new UserType with the config variables given.
delete ( ) : boolean Delete the user type.
exists ( ) : boolean Whether the user type exists or not
getConfig ( ) : array Return an array of config values in the form array("varname" => "value");
getId ( ) : integer Get the id of this user type.
getName ( ) : string Get the name of this user type.
getValue ( string $p_varName ) : mixed Return the value of the given variable name.
hasPermission ( string $p_permissionString ) : boolean Return true if the user type has the permission specified.
setPermission ( $p_permissionString, $p_permissionValue ) Set the specified permission.
setValue ( string $p_varName, mixed $p_value ) : void Set the default config value for the given variable.

메소드 상세

GetByName() 공개 정적인 메소드

Get the user type that matches the given name.
public static GetByName ( $p_name ) : mixed
$p_name The name of the user type
리턴 mixed null If the user type does not exists or any error UserType object

GetUserTypeFromConfig() 공개 정적인 메소드

Get the user type that matches the given config variables.
public static GetUserTypeFromConfig ( $p_configVars ) : mixed
$p_configVars An array of permissions variables
리턴 mixed bool False The config passed does not match any user type object $userType The user type object matching

GetUserTypes() 공개 정적인 메소드

Get all the user types with the exception of those with the Reader permission.
public static GetUserTypes ( ) : array
리턴 array An array of UserType objects.

UserType() 공개 메소드

Constructor
public UserType ( $p_userTypeId = null ) : void
$p_userTypeId (optional) The user type identifier
리턴 void

create() 공개 메소드

If a config variable is not set, the default value will be used.
public create ( $p_name = null, $p_configVars = [] ) : boolean
$p_configVars The privileges list to be granted
리턴 boolean TRUE on success, FALSE on failure

delete() 공개 메소드

Delete the user type.
public delete ( ) : boolean
리턴 boolean TRUE on success, FALSE on failure

exists() 공개 메소드

Whether the user type exists or not
public exists ( ) : boolean
리턴 boolean $this->m_exists TRUE on success, FALSE on failure

getConfig() 공개 메소드

Return an array of config values in the form array("varname" => "value");
public getConfig ( ) : array
리턴 array

getId() 공개 메소드

Get the id of this user type.
public getId ( ) : integer
리턴 integer

getName() 공개 메소드

Get the name of this user type.
public getName ( ) : string
리턴 string

getValue() 공개 메소드

If the variable name does not exist, return null.
public getValue ( string $p_varName ) : mixed
$p_varName string
리턴 mixed

hasPermission() 공개 메소드

Return true if the user type has the permission specified.
public hasPermission ( string $p_permissionString ) : boolean
$p_permissionString string
리턴 boolean

setPermission() 공개 메소드

Set the specified permission.
public setPermission ( $p_permissionString, $p_permissionValue )
$p_permissionString
$p_permissionValue

setValue() 공개 메소드

This creates the new config variable if it didn't exist.
public setValue ( string $p_varName, mixed $p_value ) : void
$p_varName string
$p_value mixed
리턴 void

프로퍼티 상세

$m_columnNames 공개적으로 프로퍼티

public $m_columnNames

$m_config 공개적으로 프로퍼티

public $m_config

$m_dbTableName 공개적으로 프로퍼티

public $m_dbTableName

$m_exists 공개적으로 프로퍼티

public $m_exists

$m_keyColumnNames 공개적으로 프로퍼티

public $m_keyColumnNames

$m_keyIsAutoIncrement 공개적으로 프로퍼티

public $m_keyIsAutoIncrement