File
class File extends DynamicModel
Class File
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 | from DynamicModel | |
protected array | $dynamicAttributes | dynamic mode 애서 사용될 attributes | from DynamicModel |
protected string | $table | The table associated with the model. | |
protected string | $fileableTable | The table associated with the model for morph. | |
protected array | $fillable | The attributes that are mass assignable. | |
bool | $incrementing | Indicates if the IDs are auto-incrementing. | |
static protected callable | $reader | The file content reader | |
static protected UrlMaker | $urls | Storage UrlMaker instance | |
string | $id | string$id | |
string | $originId | string$originId | |
string | $userId | string$userId | |
string | $disk | string$disk | |
string | $path | string$path | |
string | $filename | string$filename | |
string | $clientname | string$clientname | |
string | $mime | string$mime | |
int | $size | int$size | |
int | $useCount | int$useCount | |
int | $downloadCount | int$downloadCount |
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.
Get a path name of file
Get the content of file
Original file's identifier
Get the derive files of current file
Get the derive files of current file with the File type
Get the files for fileable
Set the ContentReader instance
Get a fileable table name
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 92
string
getPathname()
Get a path name of file
at line 102
string
getContent()
Get the content of file
at line 112
string
getOriginKey()
Original file's identifier
at line 122
Collection|File[]
getDerives()
Get the derive files of current file
at line 132
Collection|File[]
getRawDerives()
Get the derive files of current file with the File type
at line 146
string
url(Closure $callback = null)
Get a file url
at line 158
Builder
scopeDerives(Builder $query, File $file)
Scope for derives
at line 171
static Collection|File[]
getByFileable(string $fileableId)
Get the files for fileable
at line 188
static void
setContentReader(callable $reader)
Set the ContentReader instance
at line 199
static void
setUrlMaker(UrlMaker $urlMaker)
Set the UrlMaker instance
at line 209
string
getFileableTable()
Get a fileable table name