Solved!
in PHP5, if you have
null);
function __get($p)
{
if( isset($this->data[$p]) ) return $this->data[$p];
}
}
?>
and
bar);
?>
will always echo 'false'. because the isset() accepts VARIABLES as it
parameters, but in this case, $foo->bar is NOT a VARIABLE. it is a
VALUE r
Sorry, updating my post.. so im passing a Store data array (from cake)
when I declare a new Store class (in smarty).
The idea is to initialize those class variables that only exists and
ignore the other ones, but for some reason the isset()
check inside the foreach() isn't working..
$data['Store']
hey guys. i suppose this is just a question about PHP classes in
general..i have a class called Store
like so:
class Store {
public $id;
public $name;
public $url;
public $email;
function __construct($data) {
}
Check out the new CakePHP Questions site ht