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'
상속: implements izzum\statemachine\loader\Loader
파일 보기 프로젝트 열기: rolfvreijdenberger/izzum-statemachine 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $json )
__toString ( )
createFromFile ( string $filename ) : JSON creates an instance of this class with the data loaded from a file.
getJSON ( )
getJSONSchema ( ) : string gets the json schema used for the datastructure of the statemachine definitions
load ( StateMachine $stateMachine ) {@inheritDoc}
toString ( )

메소드 상세

__construct() 공개 메소드

public __construct ( string $json )
$json string optional a valid json string according to the schema

__toString() 공개 메소드

public __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() 공개 메소드

public getJSON ( )

getJSONSchema() 공개 메소드

gets the json schema used for the datastructure of the statemachine definitions
public getJSONSchema ( ) : string
리턴 string

load() 공개 메소드

{@inheritDoc}
public load ( StateMachine $stateMachine )
$stateMachine izzum\statemachine\StateMachine

toString() 공개 메소드

public toString ( )