ex / package
This package is abandoned and no longer maintained.
No replacement package was suggested.
Ex package for BEAR.Sunday
0.1.0
2015-03-02 08:41 UTC
Requires
- bear/package: ~1.0
- ray/aura-sql-module: ~1.0
- ray/dbal-module: ~0.1
- vlucas/phpdotenv: ~1.0
This package is auto-updated.
Last update: 2021-02-22 13:59:20 UTC
README
このレポジトリはエキサイト のために作られました。
This repository was created for Excite Japan.
Ex.Package
Ex Package for BEAR.Sunday
include packages
composer install
$ create-project bear/skeleton:~1.0@dev Vendor.Package // install bear.skeleton first
$ cd Vendor.Package
$ composer require ex/package:~0.1@dev
$ phpunit
module install
use Ex\Package\ExAppModule; use Ray\Di\AbstractModule; use Ex\Package\ExAppModule; use BEAR\Package\AppMeta; use BEAR\Package\PackageModule; use Dotenv; use Ray\AuraSqlModule\AuraSqlModule; use Ray\DbalModule\DbalModule; use Ray\Di\AbstractModule; class ExAppModule extends AbstractModule { /** * {@inheritdoc} */ protected function configure() { // app meta $appMeta = new AppMeta('Ex\App'); // dot env Dotenv::load($appMeta->appDir); Dotenv::required(['PDO_DSN', 'PDO_USER', 'PDO_PASSWORD']); Dotenv::required(['DBAL_CONFIG']); // bear/package $this->install(new PackageModule($appMeta)); // ex/package $this->install(new ExModule); $this->install(new AuraSqlModule($_ENV['PDO_DSN'], $_ENV['PDO_USER']. $_ENV['PDO_PASSWORD'])); $this->install(new DbalModule($_ENV['DBAL_CONFIG'])); } }
Config
Database
$ cp vendor/ex/package/docs/demo-app/.env .
.env
# aura/sql
PDO_DSN=mysql:host=localhost;dbname=test
PDO_USER=username
PDO_PASSWORD=password
# doctrine/dbal
# @see http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html
DBAL_CONFIG=driver=pdo_sqlite&path=/tmp/db.sqlite
DI
- AuraSqlInject for
ExtendedPdoInterface