This is an extension for the Yii Framework that integrates Doctrine 2 ORM & ODM projects
- PHP 5.3.2 (or later)*
- YiiFramework 1.1.14 (or later)
-
Download and place the 'yiidoctrine2' directory in your Yii extension directory.
-
In config/main.php you will need to add the YiiDoctrine alias. This allows for flexability in where you place the extension.
'aliases' => array(
.. .
'YiiDoctrine' => realpath(__DIR__ . '/../extensions/bluecloudy/yiidoctrine2'),
.. .
),
- Include ext.bluecloudy.YiiDoctrine.components.YDComponent.
'components' => array(
'doctrine'=>array(
'class' => 'YiiDoctrine.components.YDComponent',
'basePath' => dirname(__FILE__),
'proxyPath' => dirname(__FILE__).'/proxies',
'entityPath' => array(
dirname(__FILE__).'/models'
),
'cachePath' => dirname(dirname(__FILE__)) . '/cache',
'db' => array(
'driver' => 'pdo_sqlite',
'path' => dirname(__FILE__).'/data/blog.db'
)
)
)
Installing With Composer
{
"require": {
"bluecloudy/yiidoctrine2": "dev-master"
}
}
- In config/main.php you will need to add the YiiDoctrine alias. This allows for flexability in where you place the extension.
'aliases' => array(
.. .
//Path to your Composer vendor dir plus vendor/bluecloudy path
'YiiDoctrine' =>realpath(__DIR__ . '/../../vendor/bluecloudy/yiidoctrine2/bluecloudy/yiidoctrine2'),
.. .
),