$this->pdo =
$pdo;
} /**
* @throws RuntimeException
*/
public function installLicense(LicenseInformation
$license) { try { // Delete previous inserted licenses
$sql = "DELETE FROM s_core_licenses WHERE module = 'SwagCommercial'";
$this->pdo->
query($sql);
// Insert new license
$sql = <<<'EOT'
INSERT INTO s_core_licenses (module,host,label,license,version,type,source,added,creation,expiration,active)
VALUES (:module,:host,:label,:license,:version,:type,:source,now(),:creation,:expiration,1)
EOT;
$prepareStatement =
$this->pdo->
prepare($sql);
$prepareStatement->
execute([ ':module' =>
$license->module,
':host' =>
$license->host,