Update the constructor in the vcard class.

This commit is contained in:
markjcrane 2016-01-20 23:56:06 -07:00
parent fe14179f0f
commit 1b79c30ce0
1 changed files with 15 additions and 5 deletions

View File

@ -13,10 +13,10 @@ class vcard {
var $revision_date; var $revision_date;
var $card; var $card;
/* /**
The class constructor. You can set some defaults here if desired. * Called when the object is created
*/ */
function vcard() { public function __construct() {
$this->log = "New vcard() called<br />"; $this->log = "New vcard() called<br />";
$this->data = array( $this->data = array(
"display_name"=>null "display_name"=>null
@ -59,7 +59,17 @@ class vcard {
,"sort_string"=>null ,"sort_string"=>null
,"note"=>null ,"note"=>null
); );
return true; return true;
}
/**
* Called when there are no references to a particular object
* unset the variables used in the class
*/
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
} }
/* /*