yii\base\Module::setVersion PHP Method

setVersion() public method

Sets current module version.
Since: 2.0.11
public setVersion ( string | callable $version )
$version string | callable the version of this module. Version can be specified as a PHP callback, which can accept module instance as an argument and should return the actual version. For example: ```php function (Module $module) { //return string } ```
    public function setVersion($version)
    {
        $this->_version = $version;
    }