コード例 #1
0
ファイル: Config.php プロジェクト: bravadomizzou/dewdrop
 /**
  * Optionally point this class at a non-standard configuration file path.
  *
  * @param string $file
  */
 public function __construct($file = null)
 {
     $paths = new Paths();
     if (!$paths->isWp()) {
         if (null === $file) {
             $file = $paths->getPluginRoot() . '/dewdrop-config.php';
         }
         if (file_exists($file) || is_readable($file)) {
             $this->data = (require $file);
         }
     } else {
         $className = '\\Dewdrop\\Bootstrap\\Wp';
         if (defined('DEWDROP_BOOTSTRAP_CLASS')) {
             $className = DEWDROP_BOOTSTRAP_CLASS;
         }
         $this->data = array('bootstrap' => $className, 'db' => array('username' => DB_USER, 'password' => DB_PASSWORD, 'host' => DB_HOST, 'name' => DB_NAME, 'type' => 'mysql'));
     }
 }