Document
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 | ||
| $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 | 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
$args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.
Resolve a connection instance.
Get the connection resolver instance.
Set the connection resolver instance.
Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
Handle dynamic method calls into the model.
division 테이블 이름 변경
user relationship
Check required attributes
Set default value to attributes
HTML 코드를 제거한 pureContent 반환
Set reply attributes value
Set reply character length
Reply character length
Make next reply code characters
덧글의 depth 반환
승인 상태 변경
change documents display condition
change documents status condition
change documents publish condition
승인
승인 신청 거절
승인 대기
발행
발행 예약
휴지통
휴지통 문서 복구
임시저장
공지 상태로 변경
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 를 처리 할 경우에 대해서 동작됨
in DynamicModel at line 124
private array
schema()
get table schema
in DynamicModel at line 135
void
fill(array $attributes)
fill
in DynamicModel at line 150
Keygen
getKeyGen()
get key generator
in DynamicModel at line 164
static void
setKeyGen(Keygen $keyGenerator)
Set key generator
in DynamicModel at line 175
static Connection
resolveConnection(string|null $connection = null)
Resolve a connection instance.
in DynamicModel at line 185
static ConnectionResolverInterface
getConnectionResolver()
Get the connection resolver instance.
in DynamicModel at line 196
static void
setConnectionResolver(ConnectionResolverInterface $resolver)
Set the connection resolver instance.
in DynamicModel at line 206
static void
unsetConnectionResolver()
Unset the connection resolver for models.
in DynamicModel at line 217
$this
setDynamic(bool $use)
dynamic query 사용하도록 설정
in DynamicModel at line 228
$this
setProxyOptions(array $options)
proxy option 설정
in DynamicModel at line 239
array
getProxyOptions()
get proxy option
in DynamicModel at line 249
array
getDynamicAttributes()
get dynamic attributes
in DynamicModel at line 261
Builder|DynamicModel
newEloquentBuilder(DynamicQuery $query)
Create a new Eloquent query builder for the model.
Xpressengine\Database\Eloquent\Builder 울 사용하도록 변경
in DynamicModel at line 272
protected DynamicQuery
newBaseQueryBuilder()
Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
in DynamicModel at line 291
protected bool
performInsert(Builder $query, array $options = array())
in DynamicModel at line 305
bool
save(array $options = array())
Save the model to the database.
in DynamicModel at line 321
static void
macro(string $name, callable $macro)
Register a custom macro.
in DynamicModel at line 332
static bool
hasMacro(string $name)
Checks if macro is registered.
in DynamicModel at line 343
mixed
callMacro(string $name, array $parameters = array())
call macro
in DynamicModel at line 359
mixed
getMacroValue(string $name)
get macro value
in DynamicModel at line 376
mixed
__call(string $method, array $parameters)
Handle dynamic method calls into the model.
in DynamicModel at line 391
mixed
__get(string $key)
Dynamically retrieve attributes on the model.
at line 189
static Document
division(string $instanceId)
division 테이블로 변경
at line 204
$this
setDivision(string $instanceId)
division 테이블 이름 변경
at line 226
BelongsTo
user()
user relationship
at line 237
void
checkRequired(array $attributes)
Check required attributes
at line 258
array
fixedAttributes(array $attributes)
Set default value to attributes
at line 298
string
getPureContent(string $content)
HTML 코드를 제거한 pureContent 반환
at line 310
void
setReply()
Set reply attributes value
at line 332
static void
setReplyCharLen(int $len)
Set reply character length
at line 342
static int
getReplyCharLen()
Reply character length
at line 353
protected string
getReplyChar(Document $parent)
get reply code
at line 374
protected string
makeReplyChar(string $prevChars = null)
Make next reply code characters
at line 402
float
getDepth()
덧글의 depth 반환
at line 413
void
setApproved(string $approved)
승인 상태 변경
at line 428
void
setDisplay(string $display)
change documents display condition
at line 443
void
setStatus(string $status)
change documents status condition
at line 459
void
setPublished(string $published)
change documents publish condition
at line 473
$this
setApprove()
승인
at line 485
$this
setReject()
승인 신청 거절
at line 497
$this
setApproveWait()
승인 대기
at line 509
$this
setPublish()
발행
at line 521
$this
setReserve()
발행 예약
at line 533
$this
setTrash()
휴지통
at line 546
$this
setRestore()
휴지통 문서 복구
at line 558
$this
setTemporary()
임시저장
at line 571
$this
setNotice(bool $notice = true)
공지 상태로 변경
at line 589
protected mixed
fireModelEvent(string $event, bool $halt = true)
Fire the given event for the model.
Document 를 확장해서 사용하는 모델의 이벤트를 실행