RatePersistence
extends RoomTypeDependencedPersistence
in package
Table of Contents
- $postType : mixed
- __construct() : mixed
- _customizeGetPostsDistinct() : string
- _customizeGetPostsJoin() : string
- _customizeGetPostsWhere() : mixed
- convertToIdTitleList() : array<string|int, mixed>
- create() : int
- Insert Post to DB
- createOrUpdate() : int
- delete() : int
- getCount() : int
- getIdTitleList() : mixed
- getPost() : mixed
- getPosts() : mixed
- update() : int
- _addRoomTypeCriteria() : mixed
- _changeToOriginalsRoomTypeIds() : mixed
- addGetPostsFilters() : mixed
- getDefaultQueryAtts() : array<string|int, mixed>
- modifyQueryAtts() : array<string|int, mixed>
- removeGetPostsFilters() : mixed
- updatePostRelatedData() : mixed
Properties
$postType
protected
mixed
$postType
Methods
__construct()
public
__construct(mixed $postType) : mixed
Parameters
- $postType : mixed
Return values
mixed —_customizeGetPostsDistinct()
public
_customizeGetPostsDistinct(string $distinct, WP_Query $wp_query) : string
Parameters
- $distinct : string
- $wp_query : WP_Query
Return values
string —_customizeGetPostsJoin()
public
_customizeGetPostsJoin(mixed $join, WP_Query $wp_query) : string
Parameters
- $join : mixed
- $wp_query : WP_Query
Return values
string —_customizeGetPostsWhere()
public
_customizeGetPostsWhere(string $where, WP_Query $wp_query) : mixed
Parameters
- $where : string
- $wp_query : WP_Query
Return values
mixed —convertToIdTitleList()
public
convertToIdTitleList(array<string|int, int>|array<string|int, WP_Post> $posts) : array<string|int, mixed>
Parameters
- $posts : array<string|int, int>|array<string|int, WP_Post>
-
Array of post ids or posts
Return values
array<string|int, mixed> —Array id => title
create()
Insert Post to DB
public
create(WPPostData $postData) : int
Parameters
- $postData : WPPostData
Tags
Return values
int —The post ID on success. The value 0 on failure.
createOrUpdate()
public
createOrUpdate(WPPostData $postData) : int
Parameters
- $postData : WPPostData
Return values
int —delete()
public
delete(WPPostData $postData) : int
Parameters
- $postData : WPPostData
Tags
Return values
int —Id of returned post. 0 on failure.
getCount()
public
getCount([array<string|int, mixed> $atts = array() ]) : int
Parameters
- $atts : array<string|int, mixed> = array()
Return values
int —getIdTitleList()
public
getIdTitleList([mixed $atts = array() ][, mixed $extend = array() ]) : mixed
Parameters
- $atts : mixed = array()
- $extend : mixed = array()
Return values
mixed —getPost()
public
getPost(mixed $id) : mixed
Parameters
- $id : mixed
Return values
mixed —getPosts()
public
getPosts([array<string|int, mixed> $atts = array() ]) : mixed
Parameters
- $atts : array<string|int, mixed> = array()
Tags
Return values
mixed —update()
public
update(WPPostData $postData) : int
Parameters
- $postData : WPPostData
Return values
int —_addRoomTypeCriteria()
protected
_addRoomTypeCriteria(mixed $atts) : mixed
Parameters
- $atts : mixed
Return values
mixed —_changeToOriginalsRoomTypeIds()
protected
_changeToOriginalsRoomTypeIds(mixed $atts) : mixed
Parameters
- $atts : mixed
Return values
mixed —addGetPostsFilters()
protected
addGetPostsFilters() : mixed
Return values
mixed —getDefaultQueryAtts()
protected
getDefaultQueryAtts([array<string|int, mixed> $customAtts = array() ]) : array<string|int, mixed>
Parameters
- $customAtts : array<string|int, mixed> = array()
-
Optional. Empty array by default.
Tags
Return values
array<string|int, mixed> —modifyQueryAtts()
protected
modifyQueryAtts(mixed $atts) : array<string|int, mixed>
Parameters
- $atts : mixed
Return values
array<string|int, mixed> —removeGetPostsFilters()
protected
removeGetPostsFilters() : mixed
Return values
mixed —updatePostRelatedData()
protected
updatePostRelatedData(WPPostData $postData) : mixed
Parameters
- $postData : WPPostData