Go to the documentation of this file.00001 <?php
00010 abstract class object {
00011
00017 protected $cfg;
00018
00025 final public function __construct(config $cfg) {
00026 $this->cfg = $cfg;
00027 $this->beforeInit();
00028 $this->cfg->checkCfg();
00029 $this->afterInit();
00030 }
00031
00035 protected function beforeInit() {}
00036
00040 protected function afterInit() {}
00041
00048 public function getAttr($name) {
00049 return $this->cfg->getInArray('attributes', $name);
00050 }
00051
00058 public function setAttr($name, $value) {
00059 $this->cfg->setInArray('attributes', $name, $value);
00060 }
00061
00067 public function getCfg() {
00068 return $this->cfg;
00069 }
00070
00071 }