Update the constructor in the vcard class.
This commit is contained in:
parent
fe14179f0f
commit
1b79c30ce0
|
|
@ -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
|
||||||
|
|
@ -62,6 +62,16 @@ class vcard {
|
||||||
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
build() method checks all the values, builds appropriate defaults for
|
build() method checks all the values, builds appropriate defaults for
|
||||||
missing values, generates the vcard data string.
|
missing values, generates the vcard data string.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue