class Document extends DynamicModel

Document

Config를 설정할 때 division 을 사용하는 경우에는 이 모델의 table 이름을 division table 이름으로 변경합니다.

Constants

CREATED_AT

column nam of created at

UPDATED_AT

column nam of updated at

DELETED_AT

column nam of deleted at

TABLE_NAME

STATUS_TRASH

STATUS_TEMP

STATUS_PRIVATE

STATUS_PUBLIC

STATUS_NOTICE

APPROVED_REJECTED

APPROVED_WAITING

APPROVED_APPROVED

PUBLISHED_REJECTED

PUBLISHED_WAITING

PUBLISHED_RESERVED

PUBLISHED_PUBLISHED

DISPLAY_HIDDEN

DISPLAY_SECRET

DISPLAY_VISIBLE

FORMAT_NONE

FORMAT_HTML

USER_TYPE_GUEST

USER_TYPE_ANONYMITY

USER_TYPE_NORMAL

USER_TYPE_USER

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
$table
$incrementing
protected $fillable
protected $casts
protected $hidden
protected $division
protected $config
protected string $connection The connection name for the model.
static protected $replyCharLen
protected array $statuses
protected array $displays
protected array $approves
protected array $publishes
string $d stringid
string $arentId stringparentId
string $nstanceId stringinstanceId
string $ype stringtype
string $serId stringuserId
string $riter stringwriter
string $mail stringemail
string $ertifyKey stringcertifyKey
integer $eadCount integerreadCount
integer $ommentCount integercommentCount
integer $ssentCount integerassentCount
integer $issentCount integerdissentCount
integer $pproved integerapproved
integer $ublished integerpublished
integer $tatus integerstatus
integer $isplay integerdisplay
integer $ormat integerformat
string $ocale stringlocale
string $itle stringtitle
string $ontent stringcontent
string $ureContent stringpureContent
string $reatedAt stringcreatedAt
string $ublishedAt stringpublishedAt
string $pdatedAt stringupdatedAt
string $eletedAt stringdeletedAt
string $ead stringhead
string $eply stringreply
string $istOrder stringlistOrder
string $paddress stringipaddress
string $serType stringuserType

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.

static Document
division(string $instanceId)

division 테이블로 변경

$this
setDivision(string $instanceId)

division 테이블 이름 변경

BelongsTo
user()

user relationship

void
checkRequired(array $attributes)

Check required attributes

array
fixedAttributes(array $attributes)

Set default value to attributes

string
getPureContent(string $content)

HTML 코드를 제거한 pureContent 반환

void
setReply()

Set reply attributes value

static void
setReplyCharLen(int $len)

Set reply character length

static int
getReplyCharLen()

Reply character length

string
getReplyChar(Document $parent)

get reply code

string
makeReplyChar(string $prevChars = null)

Make next reply code characters

float
getDepth()

덧글의 depth 반환

void
setApproved(string $approved)

승인 상태 변경

void
setDisplay(string $display)

change documents display condition

void
setStatus(string $status)

change documents status condition

void
setPublished(string $published)

change documents publish condition

$this
setApprove()

승인

$this
setReject()

승인 신청 거절

$this
setApproveWait()

승인 대기

$this
setPublish()

발행

$this
setReserve()

발행 예약

$this
setTrash()

휴지통

$this
setRestore()

휴지통 문서 복구

$this
setTemporary()

임시저장

$this
setNotice(bool $notice = true)

공지 상태로 변경

mixed
fireModelEvent(string $event, bool $halt = true)

Fire the given event for the model.

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 189
static Document division(string $instanceId)

division 테이블로 변경

Parameters

string $instanceId instance id

Return Value

Document

at line 204
$this setDivision(string $instanceId)

division 테이블 이름 변경

Parameters

string $instanceId instance id

Return Value

$this

at line 226
BelongsTo user()

user relationship

Return Value

BelongsTo

at line 237
void checkRequired(array $attributes)

Check required attributes

Parameters

array $attributes attributes

Return Value

void

at line 258
array fixedAttributes(array $attributes)

Set default value to attributes

Parameters

array $attributes attributes

Return Value

array

at line 298
string getPureContent(string $content)

HTML 코드를 제거한 pureContent 반환

Parameters

string $content content

Return Value

string

at line 310
void setReply()

Set reply attributes value

Return Value

void

at line 332
static void setReplyCharLen(int $len)

Set reply character length

Parameters

int $len reply character length

Return Value

void

at line 342
static int getReplyCharLen()

Reply character length

Return Value

int

at line 353
protected string getReplyChar(Document $parent)

get reply code

Parameters

Document $parent Parent document model

Return Value

string

at line 374
protected string makeReplyChar(string $prevChars = null)

Make next reply code characters

Parameters

string $prevChars previous child reply code character

Return Value

string

Exceptions

ReplyLimitationException

at line 402
float getDepth()

덧글의 depth 반환

Return Value

float

at line 413
void setApproved(string $approved)

승인 상태 변경

Parameters

string $approved condition value. 'approved':승인됨, 'waiting':대기중, 'rejected':거절됨

Return Value

void

at line 428
void setDisplay(string $display)

change documents display condition

Parameters

string $display condition value 'visible':보여짐, 'secret':비밀글, 'hidden':숨김

Return Value

void

at line 443
void setStatus(string $status)

change documents status condition

Parameters

string $status condition value. 'usual':일반, 'temp':임시저장글, 'trash':휴지통글

Return Value

void

at line 459
void setPublished(string $published)

change documents publish condition

Parameters

string $published condition value. 'published':발행됨, 'waiting':대기중, 'reserved':발행예약됨, 'rejected':거절됨

Return Value

void

at line 473
$this setApprove()

승인

Return Value

$this

at line 485
$this setReject()

승인 신청 거절

Return Value

$this

at line 497
$this setApproveWait()

승인 대기

Return Value

$this

at line 509
$this setPublish()

발행

Return Value

$this

at line 521
$this setReserve()

발행 예약

Return Value

$this

at line 533
$this setTrash()

휴지통

Return Value

$this

at line 546
$this setRestore()

휴지통 문서 복구

Return Value

$this

at line 558
$this setTemporary()

임시저장

Return Value

$this

at line 571
$this setNotice(bool $notice = true)

공지 상태로 변경

Parameters

bool $notice is notice

Return Value

$this

at line 589
protected mixed fireModelEvent(string $event, bool $halt = true)

Fire the given event for the model.

Document 를 확장해서 사용하는 모델의 이벤트를 실행

Parameters

string $event event
bool $halt halt

Return Value

mixed