Hi,
I've created a class and I can't seem to access its variables.
Encrypt.php
<?php
class Encrypt extends dataobject {
private $key = "key1";
public function DoEncrypt($code){
$key = "key2";
return $key . " | " . $this->key . " |";
}
}
Page.php
public function Code(){
return Encrypt::DoEncrypt("45");
}
Result
key2 | |
How do I access $key outside the function.
Thanks in advance.