\TriTan\Common\PosttypePosttypeMapper

Summary

Methods
Properties
Constants
__construct()
findById()
findAll()
create()
populate()
insert()
update()
save()
delete()
$db
$context
No constants found
__create()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$db

$db : 

Type

$context

$context : 

Type

Methods

findById()

findById(string  $id) : \TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype|null

Fetch a posttype object by ID

Parameters

string $id

Returns

\TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype|null —

Returns posttype object if exist and NULL otherwise.

findAll()

findAll() : object

Fetch all posttypes.

Returns

object —

Posttype data object.

create()

create(array  $data = null) : \TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype.

Create a new instance of Posttype. Optionally populating it from a data array.

Parameters

array $data

Returns

\TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype.

populate()

populate(\TriTan\Common\Posttype\Posttype  $posttype, array  $data) : \TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype

Populate the Posttype object with the data array.

Parameters

\TriTan\Common\Posttype\Posttype $posttype

object.

array $data

Posttype data.

Returns

\TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype

insert()

insert(\TriTan\Common\Posttype\Posttype  $posttype) : integer

Inserts a new posttype into the posttype document.

Parameters

\TriTan\Common\Posttype\Posttype $posttype

Posttype object.

Returns

integer —

Last insert id.

delete()

delete(\TriTan\Common\Posttype\Posttype  $posttype) : boolean

Deletes posttype object.

Parameters

\TriTan\Common\Posttype\Posttype $posttype

Posttype object.

Returns

boolean —

True if deleted, false otherwise.

__create()

__create() : \TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype

Create a new Posttype object.

Returns

\TriTan\Common\Posttype\TriTan\Common\Posttype\Posttype