/** * Get the config vars from ####conf string. * @see Dog_Vars * @return array */ public function getConfigVars() { static $MAGIC = '####conf '; $row = false; if (false !== ($fh = fopen($this->path, 'r'))) { while (false !== ($row = fgets($fh))) { if (Common::startsWith($row, $MAGIC)) { break; } } fclose($fh); } return $row === false ? array() : Dog_Var::parseConfigVars(trim(substr($row, strlen($MAGIC))), NULL, $this->name); }
public function getConfigVars() { $string = ''; foreach ($this->getOptions() as $name => $str) { $string .= ",,,{$name},{$str}"; } return $string === '' ? array() : Dog_Var::parseConfigVars(substr($string, 3), $this->getName()); }