Свойство | Type | Description | |
---|---|---|---|
$stockRepo |
Méthode | Description | |
---|---|---|
__construct ( Owl\Repositories\StockRepositoryInterface $stockRepo ) | ||
delete ( $user_id, $item_id ) : boolean | Delete a "Stock data". | |
firstOrCreate ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Model | get "Stock data" or Store a "Stock data". | |
getByItemId ( $item_id ) : Illuminate\Database\Eloquent\Collection | Get "Stock data". | |
getByUserIdAndItemId ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Collection | Get "Stock data". | |
getRankingWithCache ( $limit ) : array | Get ranking data from cache. | |
getRecentRankingWithCache ( $limit, $dayPeriod ) : array | Get recent ranking data from cache. | |
getStockList ( $user_id ) : array | Get stock lists. |
public __construct ( Owl\Repositories\StockRepositoryInterface $stockRepo ) | ||
$stockRepo | Owl\Repositories\StockRepositoryInterface |
public firstOrCreate ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Model | ||
$user_id | int user_id | |
$item_id | int item_id | |
Résultat | Illuminate\Database\Eloquent\Model |
public getByItemId ( $item_id ) : Illuminate\Database\Eloquent\Collection | ||
$item_id | int item_id | |
Résultat | Illuminate\Database\Eloquent\Collection | | Illuminate\Database\Eloquent\Builder |
public getByUserIdAndItemId ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Collection | ||
$user_id | int user_id | |
$item_id | int item_id | |
Résultat | Illuminate\Database\Eloquent\Collection | | Illuminate\Database\Eloquent\Builder |
public getRankingWithCache ( $limit ) : array | ||
$limit | int limit date | |
Résultat | array |
public getRecentRankingWithCache ( $limit, $dayPeriod ) : array | ||
$limit | int limit date | |
$dayPeriod | int day period | |
Résultat | array |
public getStockList ( $user_id ) : array | ||
$user_id | int user_id | |
Résultat | array |