CodeExplorer setExpirationDate example
$subscription = null;
if (isset($row['subscription'
])) { $subscription =
$row['subscription'
];
$licence->
setSubscription($subscription['type'
]['name'
]);
} if (isset($subscription) &&
$subscription['expirationDate'
]) { $date =
new DateTime($subscription['expirationDate'
]);
$licence->
setExpirationDate($date);
} else { if (isset($row['expirationDate'
])) { $date =
new DateTime($row['expirationDate'
]);
$licence->
setExpirationDate($date);
} } $licence->
setLicenseKey($row['licenseKey'
]);
$licenseCheck =
isset($row['isLicenseCheckEnabled'
]) ?
$row['isLicenseCheckEnabled'
] : !
empty($row['licenseKey'
]);
$licence->
setIsLicenseCheckEnabled($licenseCheck);