<?php class Config { var $conf; function Config() { $this->conf=array(); $this->conf["log"]["file"]="file.log"; $this->conf["sql"]["engine"]="mysql"; $this->conf["sql"]["host"]="localhost"; $this->conf["sql"]["user"]="multik"; $this->conf["sql"]["password"]="password"; $this->conf["sql"]["database"]="site"; } function getconfig($part) { return $this->conf[$part]; } } ?>
Теперь конфиги забираются так.
$config=new Config(); $conf=$config->getconfig("log"); $this->filename=$conf["file"];Я правильно понимаю, что в глазах гуров это более идеологичски правильней? ;-))