PHP 클래스 Owl\Services\ItemService

상속: extends Service
파일 보기 프로젝트 열기: owl/owl 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$itemHistoryRepo
$itemRepo
$searchService

공개 메소드들

메소드 설명
__construct ( Owl\Repositories\ItemRepositoryInterface $itemRepo, Owl\Repositories\ItemHistoryRepositoryInterface $itemHistoryRepo, SearchService $searchService )
changeFts ( integer $id, object $obj ) : Illuminate\Database\Eloquent\Model change fts data. (delete and insert)
create ( $obj ) : Illuminate\Database\Eloquent\Model Create a new item.
createHistory ( object $item, object $user ) : Illuminate\Database\Eloquent\Model Create a item history.
createOpenItemId ( ) : string Create open item id.
delete ( $item_id ) : boolean Delete a item.
getAll ( ) : Illuminate\Database\Eloquent\Model Get all items.
getAllFlowPublished ( ) : Illuminate\Database\Eloquent\Model Get flow published items.
getAllPublished ( ) : Illuminate\Database\Eloquent\Model Get all published items.
getAllStockPublished ( ) : Illuminate\Database\Eloquent\Model Get stock published items.
getById ( integer $item_id ) : Illuminate\Database\Eloquent\Model Get a item by item id.
getByOpenItemId ( integer $open_item_id ) : Illuminate\Database\Eloquent\Model Get a item by open item id.
getByOpenItemIdWithComment ( integer $open_item_id ) : Illuminate\Database\Eloquent\Model Get a item by open item id with comments.
getHistoryByOpenItemId ( string $open_item_id ) : Illuminate\Database\Eloquent\Model Get a item history by open item id.
getLikeUsersById ( integer $item_id ) : Illuminate\Database\Eloquent\Model Get like users by item id.
getRecentsByLoginUserIdWithPaginate ( integer $user_id ) : Illuminate\Database\Eloquent\Model Get recent items by login user id with paginate.
getRecentsByTagId ( $tag_id ) : Illuminate\Database\Eloquent\Model Get recent items by tag id.
getRecentsByUserId ( integer $user_id ) : Illuminate\Database\Eloquent\Model Get recent items by user id.
getRecentsByUserIdWithPaginate ( integer $user_id ) : Illuminate\Database\Eloquent\Model Get recent items by user id with paginate.
getTagsToArray ( object $item ) : array get item tags array
update ( $id, $obj ) : Illuminate\Database\Eloquent\Model Update a item.

메소드 상세

__construct() 공개 메소드

public __construct ( Owl\Repositories\ItemRepositoryInterface $itemRepo, Owl\Repositories\ItemHistoryRepositoryInterface $itemHistoryRepo, SearchService $searchService )
$itemRepo Owl\Repositories\ItemRepositoryInterface
$itemHistoryRepo Owl\Repositories\ItemHistoryRepositoryInterface
$searchService SearchService

changeFts() 공개 메소드

change fts data. (delete and insert)
public changeFts ( integer $id, object $obj ) : Illuminate\Database\Eloquent\Model
$id integer
$obj object
리턴 Illuminate\Database\Eloquent\Model

create() 공개 메소드

Create a new item.
public create ( $obj ) : Illuminate\Database\Eloquent\Model
$obj user_id, open_item_id, title, body, published
리턴 Illuminate\Database\Eloquent\Model

createHistory() 공개 메소드

Create a item history.
public createHistory ( object $item, object $user ) : Illuminate\Database\Eloquent\Model
$item object
$user object
리턴 Illuminate\Database\Eloquent\Model

createOpenItemId() 공개 메소드

Create open item id.
public createOpenItemId ( ) : string
리턴 string

delete() 공개 메소드

Delete a item.
public delete ( $item_id ) : boolean
$item_id int
리턴 boolean

getAll() 공개 메소드

Get all items.
public getAll ( ) : Illuminate\Database\Eloquent\Model
리턴 Illuminate\Database\Eloquent\Model

getAllFlowPublished() 공개 메소드

Get flow published items.
public getAllFlowPublished ( ) : Illuminate\Database\Eloquent\Model
리턴 Illuminate\Database\Eloquent\Model

getAllPublished() 공개 메소드

Get all published items.
public getAllPublished ( ) : Illuminate\Database\Eloquent\Model
리턴 Illuminate\Database\Eloquent\Model

getAllStockPublished() 공개 메소드

Get stock published items.
public getAllStockPublished ( ) : Illuminate\Database\Eloquent\Model
리턴 Illuminate\Database\Eloquent\Model

getById() 공개 메소드

Get a item by item id.
public getById ( integer $item_id ) : Illuminate\Database\Eloquent\Model
$item_id integer
리턴 Illuminate\Database\Eloquent\Model

getByOpenItemId() 공개 메소드

Get a item by open item id.
public getByOpenItemId ( integer $open_item_id ) : Illuminate\Database\Eloquent\Model
$open_item_id integer
리턴 Illuminate\Database\Eloquent\Model

getByOpenItemIdWithComment() 공개 메소드

Get a item by open item id with comments.
public getByOpenItemIdWithComment ( integer $open_item_id ) : Illuminate\Database\Eloquent\Model
$open_item_id integer
리턴 Illuminate\Database\Eloquent\Model

getHistoryByOpenItemId() 공개 메소드

Get a item history by open item id.
public getHistoryByOpenItemId ( string $open_item_id ) : Illuminate\Database\Eloquent\Model
$open_item_id string
리턴 Illuminate\Database\Eloquent\Model

getLikeUsersById() 공개 메소드

Get like users by item id.
public getLikeUsersById ( integer $item_id ) : Illuminate\Database\Eloquent\Model
$item_id integer
리턴 Illuminate\Database\Eloquent\Model

getRecentsByLoginUserIdWithPaginate() 공개 메소드

Get recent items by login user id with paginate.
public getRecentsByLoginUserIdWithPaginate ( integer $user_id ) : Illuminate\Database\Eloquent\Model
$user_id integer
리턴 Illuminate\Database\Eloquent\Model

getRecentsByTagId() 공개 메소드

Get recent items by tag id.
public getRecentsByTagId ( $tag_id ) : Illuminate\Database\Eloquent\Model
리턴 Illuminate\Database\Eloquent\Model

getRecentsByUserId() 공개 메소드

Get recent items by user id.
public getRecentsByUserId ( integer $user_id ) : Illuminate\Database\Eloquent\Model
$user_id integer
리턴 Illuminate\Database\Eloquent\Model

getRecentsByUserIdWithPaginate() 공개 메소드

Get recent items by user id with paginate.
public getRecentsByUserIdWithPaginate ( integer $user_id ) : Illuminate\Database\Eloquent\Model
$user_id integer
리턴 Illuminate\Database\Eloquent\Model

getTagsToArray() 공개 메소드

get item tags array
public getTagsToArray ( object $item ) : array
$item object
리턴 array

update() 공개 메소드

Update a item.
public update ( $id, $obj ) : Illuminate\Database\Eloquent\Model
$obj user_id, open_item_id, title, body, published
리턴 Illuminate\Database\Eloquent\Model

프로퍼티 상세

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

protected $itemHistoryRepo

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

protected $itemRepo

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

protected $searchService