ActivityLog\Module::update PHP Method

update() public method

Update module
public update ( string $latestVersion ) : boolean
$latestVersion string Latest version
return boolean
    public function update($latestVersion)
    {
        $filename = __DIR__ . sprintf('/data/update/%s/install-%s.sql', $latestVersion, str_replace('pdo_', '', $this->getDriverName()));
        if (file_exists($filename)) {
            $pdoResource = $this->getAdapter()->getDriver()->getConnection()->getResource();
            $pdoResource->exec(file_get_contents($filename));
        }
        return true;
    }