Hi.
A chunk in the RFC:
abstract class Constraint {
public $groups;
public function __construct() {
unset($this->groups);
}
public function __get($name) {
// Will get called on first access, but once initialized.
$this->groups = ...;
}
}
Interesting! new to me.
Maybe someday we will have this one:
abstract class Constraint {
public lazy $groups;
public function __construct() {
// no need to do this:
// unset($this->groups);
}
public function __get($name) {
// Will get called on first access, but once initialized.
$this->groups = ...;
}
}
Regards,
Hendra Gunawan.