EOT;
$prepareStatement =
$this->connection->
prepare($sql);
$prepareStatement->
execute([ ':module' =>
$license->module,
':host' =>
$license->host,
':label' =>
$license->label,
':license' =>
$license->license,
':version' =>
$license->version,
':type' =>
$license->type,
':source' =>
$license->source,
':creation' =>
$this->
checkDate($license->creation
),
':expiration' =>
$this->
checkDate($license->expiration
),
]);
} catch (PDOException
$e) { throw new RuntimeException('Could not insert license into database', 0,
$e);
} } /**
* Checks if a date string is plausible.
* If not, returns null. Otherwise the string.
*
* @param string $date
*
* @return string|null
*/