PHP Класс izzum\statemachine\loader\JSON
The json string can contain one or more machine definitions.
The correct machine will be found from the json structure.
This class provides a way to load json from a file on your file system (fast access)
and is also used by the Redis adapter to load a json string from a redis server.
The format of the data to be loaded is specified via a json-schema.
The schema can be retrieved via JSON::getJSONSchema() and the schema itself and
a full example of the data can be found in 'assets/json'
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Описание методов
__construct()
публичный Метод
__toString()
публичный Метод
createFromFile()
публичный статический Метод
creates an instance of this class with the data loaded from a file.
public static createFromFile ( string $filename ) : JSON |
$filename |
string |
eg: __DIR__ . '/../../configuration.json' |
Результат |
JSON |
an instance of JSON with the data read from the file |
getJSON()
публичный Метод
getJSONSchema()
публичный Метод
gets the json schema used for the datastructure of the statemachine definitions
public load ( StateMachine $stateMachine ) |
$stateMachine |
izzum\statemachine\StateMachine |
|
toString()
публичный Метод