| 1 | <?php |
||
| 23 | class VersionFieldVersioner implements JsonVersioner |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $fieldName; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Creates a new versioner. |
||
| 32 | * |
||
| 33 | * @param string $fieldName The name of the version field |
||
| 34 | */ |
||
| 35 | 6 | public function __construct($fieldName = 'version') |
|
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | 3 | public function parseVersion(stdClass $jsonData) |
|
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritdoc} |
||
| 57 | */ |
||
| 58 | 3 | public function updateVersion(stdClass $jsonData, $version) |
|
| 62 | } |
||
| 63 |