PHP Class Xpressengine\Storage\File

Author: XE Team (developers) ([email protected])
Inheritance: implements JsonSerializabl\JsonSerializable, use trait Xpressengine\Support\EntityTrait
Show file Open project: xpressengine/xpressengine Class Usage Examples

Public Properties

Property Type Description
$incrementing boolean Indicates if the IDs are auto-incrementing.

Protected Properties

Property Type Description
$fileableTable string The table associated with the model for morph.
$reader Xpressengine\Storage\ContentReaderInterface The ContentReader instance
$table string The table associated with the model.
$urls Xpressengine\Storage\UrlMaker Storage UrlMaker instance

Public Methods

Method Description
getByFileable ( string $fileableId ) : Illuminate\Database\Eloquent\Collection | static[] Get the files for fileable
getContent ( ) : string Get the content of file
getDerives ( ) : Illuminate\Database\Eloquent\Collection | static[] Get the derive files of current file
getFileableTable ( ) : string Get a fileable table name
getOriginKey ( ) : string Original file's identifier
getPathname ( ) : string Get a path name of file
getRawDerives ( ) : Illuminate\Database\Eloquent\Collection | static[] Get the derive files of current file with the File type
scopeDerives ( Builder $query, File $file ) : Builder Scope for derives
setContentReader ( Xpressengine\Storage\ContentReaderInterface $reader ) : void Set the ContentReader instance
setUrlMaker ( Xpressengine\Storage\UrlMaker $urlMaker ) : void Set the UrlMaker instance
url ( Closur\Closure $callback = null ) : string Get a file url

Method Details

getByFileable() public static method

Get the files for fileable
public static getByFileable ( string $fileableId ) : Illuminate\Database\Eloquent\Collection | static[]
$fileableId string fileable identifier
return Illuminate\Database\Eloquent\Collection | static[]

getContent() public method

Get the content of file
public getContent ( ) : string
return string

getDerives() public method

Get the derive files of current file
public getDerives ( ) : Illuminate\Database\Eloquent\Collection | static[]
return Illuminate\Database\Eloquent\Collection | static[]

getFileableTable() public method

Get a fileable table name
public getFileableTable ( ) : string
return string

getOriginKey() public method

Original file's identifier
public getOriginKey ( ) : string
return string

getPathname() public method

Get a path name of file
public getPathname ( ) : string
return string

getRawDerives() public method

Get the derive files of current file with the File type
public getRawDerives ( ) : Illuminate\Database\Eloquent\Collection | static[]
return Illuminate\Database\Eloquent\Collection | static[]

scopeDerives() public method

Scope for derives
public scopeDerives ( Builder $query, File $file ) : Builder
$query Illuminate\Database\Eloquent\Builder query builder instance
$file File file instance
return Illuminate\Database\Eloquent\Builder

setContentReader() public static method

Set the ContentReader instance
public static setContentReader ( Xpressengine\Storage\ContentReaderInterface $reader ) : void
$reader Xpressengine\Storage\ContentReaderInterface content reader instance
return void

setUrlMaker() public static method

Set the UrlMaker instance
public static setUrlMaker ( Xpressengine\Storage\UrlMaker $urlMaker ) : void
$urlMaker Xpressengine\Storage\UrlMaker UrlMaker instance
return void

url() public method

Get a file url
public url ( Closur\Closure $callback = null ) : string
$callback Closur\Closure callback
return string

Property Details

$fileableTable protected property

The table associated with the model for morph.
protected string $fileableTable
return string

$incrementing public property

Indicates if the IDs are auto-incrementing.
public bool $incrementing
return boolean

$reader protected static property

The ContentReader instance
protected static ContentReaderInterface,Xpressengine\Storage $reader
return Xpressengine\Storage\ContentReaderInterface

$table protected property

The table associated with the model.
protected string $table
return string

$urls protected static property

Storage UrlMaker instance
protected static UrlMaker,Xpressengine\Storage $urls
return Xpressengine\Storage\UrlMaker