/yii2-orientdb

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

OrientDB Extension for Yii 2


This extension provides the OrientDB integration for the Yii framework 2.0.

For license information check the LICENSE-file.

Provide a OrientDB client connection from [Ostico PhpOrient extension]

Installation

This extension requires OrientDB server version 2.0 or higher.

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist loutrux/yii2-orientdb

or add

"loutrux/yii2-orientdb": "~1.0.0"

to the require section of your composer.json.

Configuration

To use this extension, simply add the following code in your application configuration:

return [
    //....
    'components' => [
        'orientdb' => [
            'class' => '\loutrux\orientdb\Connection',
            'hostname'  => 'localhost',
            'port'      => 2424,
            'username'  => 'root',
            'password'  => 'root_pass',
            'dbname'    => 'mydb'
        ],
    ],
];

Usage

This component is a OrientDB client helper

\Yii::$app->orientdb->client;