libSmalldb  v2.0.2
Public Member Functions | List of all members
StateDefinition Class Reference

Inheritance diagram for StateDefinition

Public Member Functions

 __construct (string $name, array $extensions=[])
 StateDefinition constructor. More...
 
 getName ()
 
 jsonSerialize ()
 
 hasExtension (string $extensionClassName)
 Return true if an extension of given type is defined for this element. More...
 
 getExtension (string $extensionClassName)
 Get an extension of given type. More...
 
 findExtension (string $extensionClassName)
 Get an extension of given type. More...
 
 getExtensionClassNames ()
 Get a list of existing extensions. More...
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( string  $name,
array  $extensions = [] 
)

StateDefinition constructor.

Parameters
string$name
ExtensionInterface[]$extensions

Member Function Documentation

◆ getName()

getName ( )

◆ jsonSerialize()

jsonSerialize ( )

◆ hasExtension()

hasExtension ( string  $extensionClassName)
inherited

Return true if an extension of given type is defined for this element.

◆ getExtension()

getExtension ( string  $extensionClassName)
inherited

Get an extension of given type.

Throws UndefinedExtensionException if the extension is not found.

It would be nice to write getExtension<T>(): T ...

ExtensionInterface

Parameters
class-string<ExtensionInterface>$extensionClassName
Returns
ExtensionInterface

◆ findExtension()

findExtension ( string  $extensionClassName)
inherited

Get an extension of given type.

Just like getExtension(), but returns null if the extension is not found.

It would be nice to write getExtension<T>(): T ...

ExtensionInterface

Parameters
class-string<ExtensionInterface>$extensionClassName
Returns
ExtensionInterface

◆ getExtensionClassNames()

getExtensionClassNames ( )
inherited

Get a list of existing extensions.

Returns
string[]