gossamer/pesedget
最新稳定版本:2.0.0
Composer 安装命令:
composer require gossamer/pesedget
包简介
php database entity manager
README 文档
README
php database entity manager
Initially intended as an Entity Manager to work within the GossamerCMS framework. This allows multiple datasources to be configured from a single configuration file and requested by their Key from the Entity Manager. It abstracts the loading of the configuration with its own bootstrap so a method can call a connection from the Entity Manager at any place in the software without worrying about whether it has been instantiated yet nor what the required credentials are for it.
The Entity Manager is a Singleton. to call it:
$manager = EntityManager::getInstance(); $connection = $manager->getConnection(); //default connection
you can specify individual connections by name:
$mysqlConnection = $manager->getConnection('mysql'); $mssqlConnection = $manager->getConnection('mssql');
the yml credentials looks like this:
database:
----mysql:
--------class: 'Gossamer\Pesedget\Database\DBConnection'
--------credentials:
-----------host: localhost
-----------username: user_id
-----------password: isnothere
-----------dbName: db_name_here
#tell the EM which connection to use if no key specified
----default: mysql
Why call it Pesedget?
The Pesedget is a group of entities in the Egyptian Pantheon. .... Group of Entities... thank you ... try the ribs...
统计信息
- 总下载量: 501
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-09