asaladino/oracle_datasource
最新稳定版本:v1.0
Composer 安装命令:
composer require asaladino/oracle_datasource
包简介
CakePHP Oracle Datasource
README 文档
README
Connect to an Oracle database using the OCI* PHP extension.
Requirements
The master branch has the following requirements:
- CakePHP 2.2.0 or greater.
- PHP 5.4.0 or greater.
Installation
[Using Composer]
Add the plugin to your project's composer.json:
{ "require": { "asaladino/oracle_datasource": "0.8.*" } }
Because this plugin has the type cakephp-plugin set in it's own composer.json, composer knows to install it inside your /Plugin directory, rather than in the usual vendors file.
It is recommended that you add /Plugin/OracleDatasource to your .gitignore file. (Why? read this.)
[Manual]
- Download the OracleDatasource archive.
- Unzip that download.
- Rename the resulting folder to
OracleDatasource - Then copy this folder into
app/Plugin/
[Enable]
Add CakePlugin::loadAll(); to bootstrap.php then implement in database.php and a model.
[database.php]
class DATABASE_CONFIG { public $oracle = array( 'datasource' => 'OracleDatasource.Oci', 'persistent' => false, 'host' => '127.0.0.1', 'port' => '1521', 'login' => 'user', 'password' => 'oracle', 'schema' => 'USER_SCHEMA', 'sid' => 'orcl', // or service name 'prefix' => '' ); }
[Your Model]
App::uses('AppModel', 'Model'); class DemoState extends AppModel { public $primaryKey = 'st'; public $displayField = 'state_name'; public $useDbConfig = 'oracle'; }
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-20