\PrivateBin\ModelComment

Comment

Model of a PrivateBin comment.

Summary

Methods
Properties
Constants
__construct()
getId()
setId()
setData()
get()
store()
delete()
exists()
isValidId()
setPaste()
getPaste()
setParentId()
getParentId()
setNickname()
No public properties found
No constants found
No protected methods found
$_id
$_data
$_conf
$_store
N/A
No private methods found
$_paste
N/A

Properties

$_id

$_id : string

Instance ID.

Type

string

$_data

$_data : \stdClass

Instance data.

Type

\stdClass

Methods

getId()

getId() : string

Get ID.

Returns

string

setId()

setId(string  $id) 

Set ID.

Parameters

string $id

Throws

\Exception

setData()

setData(string  $data) 

Set data and recalculate ID.

Parameters

string $data

Throws

\Exception

get()

get() : \PrivateBin\Model\stdClass

Get comment data.

Throws

\Exception

Returns

\PrivateBin\Model\stdClass

store()

store() 

Store the comment's data.

Throws

\Exception

delete()

delete() 

Delete the comment.

Throws

\Exception

exists()

exists() : boolean

Test if comment exists in store.

Returns

boolean

isValidId()

isValidId(string  $id) : boolean

Validate ID.

Parameters

string $id

Returns

boolean

setPaste()

setPaste(\PrivateBin\Model\Paste  $paste) 

Set paste.

Parameters

\PrivateBin\Model\Paste $paste

Throws

\Exception

setParentId()

setParentId(string  $id) 

Set parent ID.

Parameters

string $id

Throws

\Exception

getParentId()

getParentId() : string

Get parent ID.

Returns

string

setNickname()

setNickname(string  $nickname) 

Set nickname.

Parameters

string $nickname

Throws

\Exception