libSmalldb  v2.0.2
Public Member Functions | Public Attributes | List of all members
CrudMachineDefinition Interface Reference

Description

CrudMachine – a basic CRUD state machine definition.

Inheritance diagram for CrudMachineDefinition

Public Member Functions

 create ($data)
 ("", {"Exists"}) More...
 
 update ($data)
 ("Exists", {"Exists"}) More...
 
 delete ()
 ("Exists", {""}) More...
 
 invalidateCache ()
 Invalidate cached data. More...
 
 getState ()
 Read state machine state. More...
 
 getDefinition ()
 Get state machine definition. More...
 
 isTransitionAllowed (string $transitionName)
 Return true when the transition is available. More...
 
 invokeTransition (string $transitionName,... $args)
 Invoke transition of the state machine. More...
 
 get (string $propertyName)
 Return value of the given property. More...
 
 getMachineType ()
 Get state machine type. More...
 
 getMachineId ()
 Get ID of the state machine. More...
 

Public Attributes

const EXISTS = "Exists"
 
const NOT_EXISTS = ""
 

Member Function Documentation

◆ create()

create (   $data)

("", {"Exists"})

◆ update()

update (   $data)

("Exists", {"Exists"})

◆ delete()

delete ( )

("Exists", {""})

◆ invalidateCache()

invalidateCache ( )
inherited

Invalidate cached data.

Todo:
Remove invalidateCache() and implement proper locking before invoking a transition.

◆ getState()

getState ( )
inherited

Read state machine state.

◆ getDefinition()

getDefinition ( )
inherited

Get state machine definition.

◆ isTransitionAllowed()

isTransitionAllowed ( string  $transitionName)
inherited

Return true when the transition is available.

◆ invokeTransition()

invokeTransition ( string  $transitionName,
  $args 
)
inherited

Invoke transition of the state machine.

◆ get()

get ( string  $propertyName)
inherited

Return value of the given property.

◆ getMachineType()

getMachineType ( )
inherited

Get state machine type.

◆ getMachineId()

getMachineId ( )
inherited

Get ID of the state machine.

The ID must be unique within state machine type.

Member Data Documentation

◆ EXISTS

const EXISTS = "Exists"

◆ NOT_EXISTS

const NOT_EXISTS = ""
inherited