PHP Interface Webmozart\Json\Versioning\JsonVersioner

Since: 1.3
Author: Bernhard Schussek ([email protected])
Show file Open project: webmozart/json Interface Usage Examples

Public Methods

Method Description
parseVersion ( stdClass $jsonData ) : string Parses and returns the version of a JSON object.
updateVersion ( stdClass $jsonData, string $version ) Updates the version of a JSON object.

Method Details

parseVersion() public method

Parses and returns the version of a JSON object.
public parseVersion ( stdClass $jsonData ) : string
$jsonData stdClass The JSON object
return string The version

updateVersion() public method

Updates the version of a JSON object.
public updateVersion ( stdClass $jsonData, string $version )
$jsonData stdClass The JSON object
$version string The version to set