DynamicModel
abstract class DynamicModel extends Model
DynamicModel
- Illuminate\Database\Eloquent\Model extends
- DynamicQuery 를 처리하기 위해 proxy, dynamic 관련 설정 요소 추가
- XE3 에서 Database column 이름을 Camel case 로 사용함에 따른 날짜 column 이름 수정
- 레코드 추가할 때 Xpressengine\Keygen\Keygen 을 이용한 id 자동 생성 기능
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 | ||
static protected ConnectionResolverInterface | $resolver | The connection resolver instance. | |
static protected array | $macros | The registered macros. | |
protected array | $proxyOptions | ||
protected bool | $dynamic | ||
protected array | $dynamicAttributes | dynamic mode 애서 사용될 attributes |
Methods
$args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.
get table schema
fill
Resolve a connection instance.
Get the connection resolver instance.
Set the connection resolver instance.
Unset the connection resolver for models.
dynamic query 사용하도록 설정
proxy option 설정
get proxy option
get dynamic attributes
Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
No description
Save the model to the database.
Register a custom macro.
Checks if macro is registered.
call macro
get macro value
Handle dynamic method calls into the model.
Dynamically retrieve attributes on the model.
Details
at line 103
array
filter(array $args, array $columns = array())
$args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.
처리중인 $columns 와 같은 이름을 데이터만 리턴됨 이 처리는 dynamic 을 통해 proxy 를 처리 할 경우에 대해서 동작됨
at line 124
private array
schema()
get table schema
at line 135
void
fill(array $attributes)
fill
at line 150
Keygen
getKeyGen()
get key generator
at line 164
static void
setKeyGen(Keygen $keyGenerator)
Set key generator
at line 175
static Connection
resolveConnection(string|null $connection = null)
Resolve a connection instance.
at line 185
static ConnectionResolverInterface
getConnectionResolver()
Get the connection resolver instance.
at line 196
static void
setConnectionResolver(ConnectionResolverInterface $resolver)
Set the connection resolver instance.
at line 206
static void
unsetConnectionResolver()
Unset the connection resolver for models.
at line 217
$this
setDynamic(bool $use)
dynamic query 사용하도록 설정
at line 228
$this
setProxyOptions(array $options)
proxy option 설정
at line 239
array
getProxyOptions()
get proxy option
at line 249
array
getDynamicAttributes()
get dynamic attributes
at line 261
Builder|DynamicModel
newEloquentBuilder(DynamicQuery $query)
Create a new Eloquent query builder for the model.
Xpressengine\Database\Eloquent\Builder 울 사용하도록 변경
at line 272
protected DynamicQuery
newBaseQueryBuilder()
Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
at line 291
protected bool
performInsert(Builder $query, array $options = array())
at line 305
bool
save(array $options = array())
Save the model to the database.
at line 321
static void
macro(string $name, callable $macro)
Register a custom macro.
at line 332
static bool
hasMacro(string $name)
Checks if macro is registered.
at line 343
mixed
callMacro(string $name, array $parameters = array())
call macro
at line 359
mixed
getMacroValue(string $name)
get macro value
at line 376
mixed
__call(string $method, array $parameters)
Handle dynamic method calls into the model.
at line 391
mixed
__get(string $key)
Dynamically retrieve attributes on the model.