class Session
{
public BaseHandler $Interface;
public function __construct()
{
$config = 'BaseHandler';
if ($config == 'BaseHandler') {
$this->$Interface = new BaseHandler();
$Session->$Interface->push('test1', true);
}
echo 'Session...';
}
}
$Session = new Session();
if($Session->$Interface) {
$Session->$Interface->push('test2', true);
}