\PrivateBin\ModelAbstractModel

AbstractModel

Abstract model for PrivateBin objects.

Summary

Methods
Properties
Constants
__construct()
getId()
setId()
setData()
get()
store()
delete()
exists()
isValidId()
No public properties found
No constants found
No protected methods found
$_id
$_data
$_conf
$_store
N/A
No private methods found
No private properties found
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() : \stdClass

Get instance data.

Returns

\stdClass

store()

store() 

Store the instance's data.

Throws

\Exception

delete()

delete() 

Delete the current instance.

Throws

\Exception

exists()

exists() : boolean

Test if current instance exists in store.

Returns

boolean

isValidId()

isValidId(string  $id) : boolean

Validate ID.

Parameters

string $id

Returns

boolean