Sets the version of the module file.
public setVersion ( string $version ) | ||
$version | string | The module file version. |
/** * {@inheritdoc} */ public function fromJson($jsonData, array $options = array()) { Assert::isInstanceOf($jsonData, 'stdClass'); $moduleFile = new ModuleFile(null, isset($options['path']) ? $options['path'] : null); $moduleFile->setVersion($this->versioner->parseVersion($jsonData)); $this->addJsonToModuleFile($jsonData, $moduleFile); return $moduleFile; }