PHP Trait Xpressengine\WidgetBox\RepositoryTrait

Show file Open project: xpressengine/xpressengine

Protected Properties

Property Type Description
$model model name. Xpressengine\Database\Eloquent\DynamicModel를 상속받은 class의 이름이어야 한다

Public Methods

Method Description
__call ( string $method, array $parameters ) : mixed __call
__construct ( mixed $model ) constructor.
createModel ( ) : DynamicModel Create model instance
delete ( DynamicModel $item ) : boolean | null delete
getModel ( ) : string The name of Category model class
query ( ) : Builder query
setModel ( string $model ) : void Set the name of Category model
update ( DynamicModel $item, array $data = [] ) : DynamicModel update

Method Details

__call() public method

__call
public __call ( string $method, array $parameters ) : mixed
$method string method name
$parameters array parameters
return mixed

__construct() public method

constructor.
public __construct ( mixed $model )
$model mixed model

createModel() public method

Create model instance
public createModel ( ) : DynamicModel
return Xpressengine\Database\Eloquent\DynamicModel

delete() public method

delete
public delete ( DynamicModel $item ) : boolean | null
$item Xpressengine\Database\Eloquent\DynamicModel item
return boolean | null

getModel() public method

The name of Category model class
public getModel ( ) : string
return string

query() public method

query
public query ( ) : Builder
return Illuminate\Database\Eloquent\Builder

setModel() public method

Set the name of Category model
public setModel ( string $model ) : void
$model string model class
return void

update() public method

update
public update ( DynamicModel $item, array $data = [] ) : DynamicModel
$item Xpressengine\Database\Eloquent\DynamicModel item
$data array data
return Xpressengine\Database\Eloquent\DynamicModel

Property Details

$model protected property

model name. Xpressengine\Database\Eloquent\DynamicModel를 상속받은 class의 이름이어야 한다
protected $model