PHP Class Owl\Repositories\Fluent\StockRepository

Inheritance: extends AbstractFluent, implements Owl\Repositories\StockRepositoryInterface
Afficher le fichier Open project: owl/owl

Protected Properties

Свойство Type Description
$table

Méthodes publiques

Méthode Description
destroy ( $user_id, $item_id ) : boolean Delete a "Stock data".
firstOrCreate ( $user_id, $item_id ) : stdClass get "Stock data" or Store a "Stock data".
getByItemId ( $item_id ) : stdClass Get "Stock data".
getByUserIdAndItemId ( $user_id, $item_id ) : stdClass Get "Stock data".
getRankingStockList ( $limit, $day_period = null ) : array Get ranking data.
getRankingWithCache ( $limit ) : array Get ranking data from cache.
getRecentRankingWithCache ( $limit, $dayPeriod ) : array Get recent ranking data from cache.
getStockById ( $id ) : stdClass Get a stock by id.
getStockList ( $user_id ) : array Get stock lists.
getTableName ( ) : string Get a table name.

Method Details

destroy() public méthode

Delete a "Stock data".
public destroy ( $user_id, $item_id ) : boolean
$user_id int user_id
$item_id int item_id
Résultat boolean

firstOrCreate() public méthode

get "Stock data" or Store a "Stock data".
public firstOrCreate ( $user_id, $item_id ) : stdClass
$user_id int user_id
$item_id int item_id
Résultat stdClass

getByItemId() public méthode

Get "Stock data".
public getByItemId ( $item_id ) : stdClass
$item_id int item_id
Résultat stdClass

getByUserIdAndItemId() public méthode

Get "Stock data".
public getByUserIdAndItemId ( $user_id, $item_id ) : stdClass
$user_id int user_id
$item_id int item_id
Résultat stdClass

getRankingStockList() public méthode

Get ranking data.
public getRankingStockList ( $limit, $day_period = null ) : array
$limit int limit date
$day_period int day period
Résultat array

getRankingWithCache() public méthode

Get ranking data from cache.
public getRankingWithCache ( $limit ) : array
$limit int limit date
Résultat array

getRecentRankingWithCache() public méthode

Get recent ranking data from cache.
public getRecentRankingWithCache ( $limit, $dayPeriod ) : array
$limit int limit date
$dayPeriod int day period
Résultat array

getStockById() public méthode

Get a stock by id.
public getStockById ( $id ) : stdClass
$id int
Résultat stdClass

getStockList() public méthode

Get stock lists.
public getStockList ( $user_id ) : array
$user_id int user_id
Résultat array

getTableName() public méthode

Get a table name.
public getTableName ( ) : string
Résultat string

Property Details

$table protected_oe property

protected $table