PHP 클래스 Owl\Services\StockService

상속: extends Service
파일 보기 프로젝트 열기: owl/owl

보호된 프로퍼티들

프로퍼티 타입 설명
$stockRepo

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

public __construct ( Owl\Repositories\StockRepositoryInterface $stockRepo )
$stockRepo Owl\Repositories\StockRepositoryInterface

delete() 공개 메소드

Delete a "Stock data".
public delete ( $user_id, $item_id ) : boolean
$user_id int user_id
$item_id int item_id
리턴 boolean

firstOrCreate() 공개 메소드

get "Stock data" or Store a "Stock data".
public firstOrCreate ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Model
$user_id int user_id
$item_id int item_id
리턴 Illuminate\Database\Eloquent\Model

getByItemId() 공개 메소드

Get "Stock data".
public getByItemId ( $item_id ) : Illuminate\Database\Eloquent\Collection
$item_id int item_id
리턴 Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Builder

getByUserIdAndItemId() 공개 메소드

Get "Stock data".
public getByUserIdAndItemId ( $user_id, $item_id ) : Illuminate\Database\Eloquent\Collection
$user_id int user_id
$item_id int item_id
리턴 Illuminate\Database\Eloquent\Collection | Illuminate\Database\Eloquent\Builder

getRankingWithCache() 공개 메소드

Get ranking data from cache.
public getRankingWithCache ( $limit ) : array
$limit int limit date
리턴 array

getRecentRankingWithCache() 공개 메소드

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

getStockList() 공개 메소드

Get stock lists.
public getStockList ( $user_id ) : array
$user_id int user_id
리턴 array

프로퍼티 상세

$stockRepo 보호되어 있는 프로퍼티

protected $stockRepo