private function _replace_vars($match) { $matched = $match[0]; $name = $match[1]; $default = is_null($this->_default) ? $matched : $this->_default; return isset($this->_values[$name]) ? $this->_values[$name] : $default; }