PHP Class Owl\Repositories\Fluent\AbstractFluent

Show file Open project: owl/owl

Protected Properties

Property Type Description
$table Table name

Public Methods

Method Description
delete ( array $wkey, $table = null ) : int:deleted Deletel a record.
find ( array $conditions ) : stcClass Find a record.
getTableName ( ) : string Get a table name.
insert ( array $params, $table = null ) : integer Insert a record.
update ( array $params, array $wkey, $table = null ) : integer Update a record.

Protected Methods

Method Description
builder ( ) : Builder Return query builder.
setTimestamps ( array $params, $createdFlag = true ) : array Set timestamps.

Method Details

builder() protected method

Return query builder.
protected builder ( ) : Builder
return Illuminate\Database\Query\Builder

delete() public method

Deletel a record.
public delete ( array $wkey, $table = null ) : int:deleted
$wkey array array :where key(column name) => value
$table string :table name(defalut: getTableName())
return int:deleted count number

find() public method

Find a record.
public find ( array $conditions ) : stcClass
$conditions array
return stcClass | null

getTableName() abstract public method

Get a table name.
abstract public getTableName ( ) : string
return string

insert() public method

Insert a record.
public insert ( array $params, $table = null ) : integer
$params array array :key(column name) => value
$table string :table name(defalut: getTableName())
return integer :inserted record's id

setTimestamps() protected method

Set timestamps.
protected setTimestamps ( array $params, $createdFlag = true ) : array
$params array array
return array

update() public method

Update a record.
public update ( array $params, array $wkey, $table = null ) : integer
$params array array :key(column name) => value
$wkey array array :where key(column name) => value
$table string :table name(defalut: getTableName())
return integer :updated count number

Property Details

$table protected property

Table name
protected $table