(PHP Extension) Transition from Cert.GetValidFromDt to Cert.ValidFromStr
Provides instructions for replacing deprecated GetValidFromDt method calls with ValidFromStr. Note: This example requires Chilkat v11.0.0 or greater.
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
$cert = new CkCert();
// ------------------------------------------------------------------------
// The GetValidFromDt method is deprecated:
// ckdt1 is a CkDateTime
$ckdt1 = $cert->GetValidFromDt();
if ($cert->get_LastMethodSuccess() == false) {
print $cert->lastErrorText() . "\n";
exit;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using the ValidFromStr property
$ckdt2 = new CkDateTime();
$ckdt2->SetFromRfc822($cert->validFromStr());
?>
|