RoomTypeRepository extends AbstractPostRepository
in package

Table of Contents

$items  : mixed
$persistence  : CPTPersistence
$type  : mixed
__construct()  : mixed
delete()  : int
findAll()  : mixed
findById()  : RoomType
findByMeta()  : mixed
findOne()  : mixed
getIdTitleList()  : mixed
mapEntityToPostData()  : WPPostData
mapPostToEntity()  : mixed
persistence()  : CPTPersistence
save()  : int
getAttributes()  : mixed
mapPostsToEntity()  : mixed

Properties

$items

protected mixed $items = array()

$persistence

protected CPTPersistence $persistence

$type

protected mixed $type = 'room_type'

Methods

__construct()

public __construct(CPTPersistence $persistence) : mixed
Parameters
$persistence : CPTPersistence
Return values
mixed

delete()

public delete(type $entity) : int
Parameters
$entity : type
Return values
int

Id of deleted entity. 0 on failure.

findAll()

public findAll([mixed $atts = array() ]) : mixed
Parameters
$atts : mixed = array()
Return values
mixed

findById()

public findById(int $id[, bool $force = false ]) : RoomType
Parameters
$id : int
$force : bool = false

Optional.

Return values
RoomType

findByMeta()

public findByMeta(string $key, mixed $value) : mixed
Parameters
$key : string
$value : mixed
Return values
mixed

TODO Bug: will find the latest entity with the right meta_key and null meta_value; with a wrong meta_key will return null.

findOne()

public findOne([mixed $atts = array() ]) : mixed
Parameters
$atts : mixed = array()
Return values
mixed

getIdTitleList()

public getIdTitleList([mixed $atts = array() ]) : mixed
Parameters
$atts : mixed = array()
Return values
mixed

mapEntityToPostData()

public mapEntityToPostData(RoomType $entity) : WPPostData
Parameters
$entity : RoomType
Return values
WPPostData

mapPostToEntity()

public mapPostToEntity(mixed $post) : mixed
Parameters
$post : mixed
Return values
mixed

persistence()

public persistence() : CPTPersistence
Tags
since
3.7.2
Return values
CPTPersistence

save()

public save(type &$entity) : int
Parameters
$entity : type
Return values
int

getAttributes()

protected getAttributes(mixed $roomTypeId) : mixed
Parameters
$roomTypeId : mixed
Return values
mixed

mapPostsToEntity()

protected mapPostsToEntity(mixed $posts) : mixed
Parameters
$posts : mixed
Return values
mixed

Search results