bacon
1.1.0
ベーコンPHPフレームワークは、あまりファズすることなく、無駄のない、清潔で、シンプルで高速なMVCフレームワークです。
サーバーの要件:
PHPと作曲家がセットアップされたら、次のようなスケルトンプロジェクトを作成できます。
% composer create-project brainsware/bacon-dist project-name
これにより、必要なすべてのソフトウェアをダウンロードし、新しいプロジェクトのすべての重要なディレクトリとサンプル構成ファイルを作成します。
Installing brainsware/bacon-dist (1.0)
- Installing brainsware/bacon-dist (1.0)
Loading from cache
Created project in project-name
Loading composer repositories with package information
Installing dependencies
- Installing brainsware/php-markdown-extra-extended (dev-master 1.0)
Cloning 1.0
- Installing brainsware/sauce (1.0)
Loading from cache
- Installing minmb/phpmailer (dev-master df44323)
Cloning df443234ad0ca10cbf91a0c0a728b256afcab1d1
- Installing twig/twig (dev-master ba67e2c)
Cloning ba67e2cf8e2ca6cada1de5a316a724df648c52ac
- Installing brainsware/bacon (1.0)
Loading from cache
Writing lock file
Generating autoload files
ベーコンは、すべての構成を保存するためにPHPファイルを使用します。
私たちが提供するスケルトンプロジェクトには、 Config/Base.phpのデフォルトのフォールバックコントローラーとして設定されているイントロコントローラーが付属しています
見たい2番目の構成ファイルはConfig/Database.phpです。データベースに設定する基本的なオプションは次のとおりです。
'server' => 'db.dbznet', # Enter your server host here
'name' => 'blogDB', # The name of your database
'type' => 'mysql', # Anything your PDO Installation supports. (http://www.php.net/manual/en/pdo.drivers.php)
'username' => 'blogDBuser', # The username you want to connect to your database with
'password' => 'VryScrPswd', # The password.
ベーコンは、これらのオプションのデフォルト値を提供しません。アプリケーションにデータベースが必要な場合は、 Config/Database.phpを介してそれを作成してベーコンを接続する必要があります。