<?php
class Base {
private $config;
protected $app;
function __construct() {
$this->config = Core::libraryConfig(__CLASS__);
}
public function __set($name, $value) {
if(!isset($this->app[$name])) $this->app[$name] = $value;
}
public function __get($name) {
if(!isset($this->app[$name])) return NULL;
return $this->app[$name];
}
}
?>
<?php
class Controller extends Shell {
function __construct() {
$this->entity = new Entity();
$this->testVar = 'Test';
}
}
?>
<?php
class Entity extends Controller {
function __construct() {
var_dump($this->testVar);
}
}
?>