PHP Interface Owl\Repositories\ItemRepositoryInterface

Datei anzeigen Open project: owl/owl

Public Methods

Method Description
createItem ( $obj ) : Illuminate\Database\Eloquent\Model Create a new item.
deleteItem ( $item_id ) : boolean Delete a item.
getAll ( ) : Illuminate\Database\Eloquent\Model Get all items.
getAllPublished ( ) : Illuminate\Database\Eloquent\Model Get all 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 ) : stdClass | null Get a item by open item id with comments.
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
updateItem ( $item_id, $obj ) : Illuminate\Database\Eloquent\Model Update a item.

Method Details

createItem() public method

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

deleteItem() public method

Delete a item.
public deleteItem ( $item_id ) : boolean
$item_id int
return boolean

getAll() public method

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

getAllPublished() public method

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

getById() public method

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

getByOpenItemId() public method

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

getByOpenItemIdWithComment() public method

Get a item by open item id with comments.
public getByOpenItemIdWithComment ( integer $open_item_id ) : stdClass | null
$open_item_id integer
return stdClass | null

getLikeUsersById() public method

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

getRecentsByLoginUserIdWithPaginate() public method

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

getRecentsByTagId() public method

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

getRecentsByUserId() public method

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

getRecentsByUserIdWithPaginate() public method

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

getTagsToArray() public method

get item tags array
public getTagsToArray ( object $item ) : array
$item object
return array

updateItem() public method

Update a item.
public updateItem ( $item_id, $obj ) : Illuminate\Database\Eloquent\Model
$item_id
$obj user_id, open_item_id, title, body, published
return Illuminate\Database\Eloquent\Model