class User extends DynamicModel implements UserInterface

Constants

CREATED_AT

column nam of created at

UPDATED_AT

column nam of updated at

DELETED_AT

column nam of deleted at

Properties

static protected Keygen $keyGenerator from DynamicModel
static protected ConnectionResolverInterface $resolver The connection resolver instance. from DynamicModel
static protected array $macros The registered macros. from DynamicModel
protected array $proxyOptions from DynamicModel
protected bool $dynamic
protected array $dynamicAttributes dynamic mode 애서 사용될 attributes from DynamicModel
protected $table
protected $connection
$incrementing
protected $dates
protected $fillable
protected $hidden
protected $appends
static protected Closure $profileImageResolver
protected string $emailForPasswordReset
static string $displayField

Methods

array
filter(array $args, array $columns = array())

$args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.

array
schema()

get table schema

void
fill(array $attributes)

fill

getKeyGen()

get key generator

static void
setKeyGen(Keygen $keyGenerator)

Set key generator

static Connection
resolveConnection(string|null $connection = null)

Resolve a connection instance.

static ConnectionResolverInterface
getConnectionResolver()

Get the connection resolver instance.

static void
setConnectionResolver(ConnectionResolverInterface $resolver)

Set the connection resolver instance.

static void
unsetConnectionResolver()

Unset the connection resolver for models.

$this
setDynamic(bool $use)

dynamic query 사용하도록 설정

$this
setProxyOptions(array $options)

proxy option 설정

array
getProxyOptions()

get proxy option

array
getDynamicAttributes()

get dynamic attributes

newEloquentBuilder(DynamicQuery $query)

Create a new Eloquent query builder for the model.

newBaseQueryBuilder()

Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리

bool
performInsert(Builder $query, array $options = array())

No description

bool
save(array $options = array())

Save the model to the database.

static void
macro(string $name, callable $macro)

Register a custom macro.

static bool
hasMacro(string $name)

Checks if macro is registered.

mixed
callMacro(string $name, array $parameters = array())

call macro

mixed
getMacroValue(string $name)

get macro value

mixed
__call(string $method, array $parameters)

Handle dynamic method calls into the model.

mixed
__get(string $key)

Dynamically retrieve attributes on the model.

__construct(array $attributes = array())

User constructor.

static void
setProfileImageResolver(Closure $callback)

setProfileImageResolver

BelongsToMany
groups()

set relationship with user groups

HasMany
accounts()

set relationship with user accounts

HasMany
emails()

set relationship with emails

HasOne
pendingEmail()

set relationship with pendingEmail

string
getProfileImageAttribute()

Get profile_image

mixed
getAuthIdentifier()

Get the unique identifier for the user.

string
getAuthPassword()

Get the password for the user.

string
getRememberToken()

Get the token value for the "remember me" session.

void
setEmailForPasswordReset(string $email)

setEmailForPasswordReset() 메소드에서 반환할 email 정보를 지정한다.

void
setRememberToken(string $value)

Set the token value for the "remember me" session.

string
getRememberTokenName()

Get the column name for the "remember me" token.

string
getEmailForPasswordReset()

Get the e-mail address where password reset links are sent.

string
getId()

Get the unique identifier

string
getDisplayName()

Get the name for display

string
getRating()

Get the rating of user

boolean
isAdmin()

Finds whether user has super rating.

boolean
isManager()

Finds whether user has manager or super rating.

string
getStatus()

Get the status of user

string
getProfileImage()

Get profile image URL of user

array
getGroups()

Get groups a user belongs

getPendingEmail()

Get Pending Email of current user

getAccountByProvider(string $provider)

회원이 소유한 계정 중에 주어진 provider를 가진 계정을 반환한다.

joinGroups(mixed $groups)

add this user to groups

leaveGroups(array $groups)

leave groups

void
setLoginTime(mixed $time = null)

최종 로그인 시간을 기록한다.

Carbon|null
getLoginAtAttribute(string $value)

loginAt 처리, loginAt이 지정되지 않았을 경우, null을 반환하도록 처리한다.

Details

in DynamicModel at line 103
array filter(array $args, array $columns = array())

$args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.

처리중인 $columns 와 같은 이름을 데이터만 리턴됨 이 처리는 dynamic 을 통해 proxy 를 처리 할 경우에 대해서 동작됨

Parameters

array $args insert, update data
array $columns table columns

Return Value

array

in DynamicModel at line 124
private array schema()

get table schema

Return Value

array

in DynamicModel at line 135
void fill(array $attributes)

fill

Parameters

array $attributes attributes

Return Value

void

in DynamicModel at line 150
Keygen getKeyGen()

get key generator

Return Value

Keygen

in DynamicModel at line 164
static void setKeyGen(Keygen $keyGenerator)

Set key generator

Parameters

Keygen $keyGenerator key generator

Return Value

void

in DynamicModel at line 175
static Connection resolveConnection(string|null $connection = null)

Resolve a connection instance.

Parameters

string|null $connection connection name

Return Value

Connection

in DynamicModel at line 185
static ConnectionResolverInterface getConnectionResolver()

Get the connection resolver instance.

Return Value

ConnectionResolverInterface

in DynamicModel at line 196
static void setConnectionResolver(ConnectionResolverInterface $resolver)

Set the connection resolver instance.

Parameters

ConnectionResolverInterface $resolver resolver

Return Value

void

in DynamicModel at line 206
static void unsetConnectionResolver()

Unset the connection resolver for models.

Return Value

void

in DynamicModel at line 217
$this setDynamic(bool $use)

dynamic query 사용하도록 설정

Parameters

bool $use use dynamic query

Return Value

$this

in DynamicModel at line 228
$this setProxyOptions(array $options)

proxy option 설정

Parameters

array $options proxy options

Return Value

$this

in DynamicModel at line 239
array getProxyOptions()

get proxy option

Return Value

array

in DynamicModel at line 249
array getDynamicAttributes()

get dynamic attributes

Return Value

array

in DynamicModel at line 261
Builder|DynamicModel newEloquentBuilder(DynamicQuery $query)

Create a new Eloquent query builder for the model.

Xpressengine\Database\Eloquent\Builder 울 사용하도록 변경

Parameters

DynamicQuery $query dynamic query builder

Return Value

Builder|DynamicModel

in DynamicModel at line 272
protected DynamicQuery newBaseQueryBuilder()

Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리

Return Value

DynamicQuery

in DynamicModel at line 291
protected bool performInsert(Builder $query, array $options = array())

Parameters

Builder $query Illuminate database eloquent buildere
array $options options

Return Value

bool

in DynamicModel at line 305
bool save(array $options = array())

Save the model to the database.

Parameters

array $options options

Return Value

bool

in DynamicModel at line 321
static void macro(string $name, callable $macro)

Register a custom macro.

Parameters

string $name macro name
callable $macro callable

Return Value

void

in DynamicModel at line 332
static bool hasMacro(string $name)

Checks if macro is registered.

Parameters

string $name macro name

Return Value

bool

in DynamicModel at line 343
mixed callMacro(string $name, array $parameters = array())

call macro

Parameters

string $name macro name
array $parameters parameters

Return Value

mixed

in DynamicModel at line 359
mixed getMacroValue(string $name)

get macro value

Parameters

string $name macro name

Return Value

mixed

in DynamicModel at line 376
mixed __call(string $method, array $parameters)

Handle dynamic method calls into the model.

Parameters

string $method method
array $parameters parameters

Return Value

mixed

in DynamicModel at line 391
mixed __get(string $key)

Dynamically retrieve attributes on the model.

Parameters

string $key key

Return Value

mixed

at line 84
__construct(array $attributes = array())

User constructor.

Parameters

array $attributes attributes

at line 97
static void setProfileImageResolver(Closure $callback)

setProfileImageResolver

Parameters

Closure $callback 회원의 프로필 이미지를 처리하기 위한 resolver

Return Value

void

at line 107
BelongsToMany groups()

set relationship with user groups

Return Value

BelongsToMany

at line 117
HasMany accounts()

set relationship with user accounts

Return Value

HasMany

at line 127
HasMany emails()

set relationship with emails

Return Value

HasMany

at line 137
HasOne pendingEmail()

set relationship with pendingEmail

Return Value

HasOne

at line 147
string getProfileImageAttribute()

Get profile_image

Return Value

string

at line 157
mixed getAuthIdentifier()

Get the unique identifier for the user.

Return Value

mixed

at line 167
string getAuthPassword()

Get the password for the user.

Return Value

string

at line 177
string getRememberToken()

Get the token value for the "remember me" session.

Return Value

string

at line 189
void setEmailForPasswordReset(string $email)

setEmailForPasswordReset() 메소드에서 반환할 email 정보를 지정한다.

Parameters

string $email 지정할 email주소

Return Value

void

at line 201
void setRememberToken(string $value)

Set the token value for the "remember me" session.

Parameters

string $value value

Return Value

void

at line 211
string getRememberTokenName()

Get the column name for the "remember me" token.

Return Value

string

at line 221
string getEmailForPasswordReset()

Get the e-mail address where password reset links are sent.

Return Value

string

at line 232
string getId()

Get the unique identifier

Return Value

string

at line 242
string getDisplayName()

Get the name for display

Return Value

string

at line 253
string getRating()

Get the rating of user

Return Value

string

at line 263
boolean isAdmin()

Finds whether user has super rating.

Return Value

boolean

at line 273
boolean isManager()

Finds whether user has manager or super rating.

Return Value

boolean

at line 283
string getStatus()

Get the status of user

Return Value

string

at line 293
string getProfileImage()

Get profile image URL of user

Return Value

string

at line 304
array getGroups()

Get groups a user belongs

Return Value

array

at line 314
PendingEmail getPendingEmail()

Get Pending Email of current user

Return Value

PendingEmail

at line 326
UserAccount getAccountByProvider(string $provider)

회원이 소유한 계정 중에 주어진 provider를 가진 계정을 반환한다.

Parameters

string $provider provider

Return Value

UserAccount

at line 344
User joinGroups(mixed $groups)

add this user to groups

Parameters

mixed $groups groups

Return Value

User

at line 358
User leaveGroups(array $groups)

leave groups

Parameters

array $groups groups

Return Value

User

at line 372
void setLoginTime(mixed $time = null)

최종 로그인 시간을 기록한다.

Parameters

mixed $time 로그인 시간

Return Value

void

at line 387
Carbon|null getLoginAtAttribute(string $value)

loginAt 처리, loginAt이 지정되지 않았을 경우, null을 반환하도록 처리한다.

Parameters

string $value date time string

Return Value

Carbon|null