Subversion Repositories PHPX

Rev

Rev 74 | Rev 76 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 74 Rev 75
Line 139... Line 139...
139
    }
139
    }
140
  }
140
  }
141
141
142
  /**
142
  /**
143
   * Reads the connection configuration for this database
143
   * Reads the connection configuration for this database
144
   * from the configuration file, application/.config
144
   * from the configuration file, .config
145
   *
145
   *
146
   * There must be an INI section named "database:" followed
146
   * There must be an INI section named "database:" followed
147
   * by the value of the <code>$_dbname</code> property
147
   * by the value of the <code>$_dbname</code> property
148
   * containing keys and values for the properties of the
148
   * containing keys and values for the properties of the
149
   * <code>Database</code> instance.  Except for the key
149
   * <code>Database</code> instance.  Except for the key
Line 157... Line 157...
157
   *   file could be read, <code>false</code> otherwise.
157
   *   file could be read, <code>false</code> otherwise.
158
   */
158
   */
159
  public function readConfig ()
159
  public function readConfig ()
160
  {
160
  {
161
    /* FIXME: Configuration file path should not be hardcoded */
161
    /* FIXME: Configuration file path should not be hardcoded */
162
    $config = parse_ini_file('application/.config', true);
162
    $config = parse_ini_file('.config', true);
163
    if ($config !== false)
163
    if ($config !== false)
164
    {
164
    {
165
      $section = 'database:' . $this->_dbname;
165
      $section = 'database:' . $this->_dbname;
166
      if (isset($config[$section]))
166
      if (isset($config[$section]))
167
      {
167
      {