nyroFwk  0.2
object.class.php
Go to the documentation of this file.
1 <?php
10 abstract class object {
11 
17  protected $cfg;
18 
25  final public function __construct(config $cfg) {
26  $this->cfg = $cfg;
27  $this->beforeInit();
28  $this->cfg->checkCfg();
29  $this->afterInit();
30  }
31 
35  protected function beforeInit() {}
36 
40  protected function afterInit() {}
41 
48  public function getAttr($name) {
49  return $this->cfg->getInArray('attributes', $name);
50  }
51 
58  public function setAttr($name, $value) {
59  $this->cfg->setInArray('attributes', $name, $value);
60  }
61 
67  public function getCfg() {
68  return $this->cfg;
69  }
70 
71 }
beforeInit()
setAttr($name, $value)
getAttr($name)
__construct(config $cfg)
Generated on Sun Oct 15 2017 22:25:20 for nyroFwk by doxygen 1.8.13