PHPackages                             christianascone/php-orientdb-http - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. christianascone/php-orientdb-http

ActiveLibrary[Database &amp; ORM](/categories/database)

christianascone/php-orientdb-http
=================================

A set of PHP libraries in order to use OrientDB from PHP with HTTP Protocol.

0.6.2(8y ago)1117MITPHPPHP &gt;=5.3.3

Since Sep 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/christianascone/php-orientdb-HTTP)[ Packagist](https://packagist.org/packages/christianascone/php-orientdb-http)[ RSS](/packages/christianascone-php-orientdb-http/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (20)Used By (0)

OrientDB PHP Library for HTTP by [Luna](http://www.lunaflpartner.it/)
=====================================================================

[](#orientdb-php-library-for-http-by-luna)

[![Build Status](https://camo.githubusercontent.com/0b267d5ff36b290fe979d383345e521248cc78850a20a0f6c7dabe3c40ad701a/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f63687269737469616e6173636f6e652f7068702d6f7269656e7464622d485454502e706e673f6272616e63683d6d6173746572)](http://secure.travis-ci.org/christianascone/php-orientdb-HTTP)[![Total Downloads](https://camo.githubusercontent.com/135541c3fefd3693570a6240008d1bccd621b6a0d041be202e8a222bf2189647/68747470733a2f2f706f7365722e707567782e6f72672f63687269737469616e6173636f6e652f7068702d6f7269656e7464622d485454502f646f776e6c6f6164732e706e67)](https://packagist.org/packages/christianascone/php-orientdb-HTTP)[![Latest Stable Version](https://camo.githubusercontent.com/b5db9a27daae70a562b528275b5cfe3733f9dd50bb63974772665ac59a5dad7a/68747470733a2f2f706f7365722e707567782e6f72672f63687269737469616e6173636f6e652f7068702d6f7269656e7464622d485454502f762f737461626c652e706e67)](https://packagist.org/packages/christianascone/php-orientdb-HTTP)

This project is born from [doctrine/orientdb-odm](https://github.com/doctrine/orientdb-odm) project.

What's Orient?
--------------

[](#whats-orient)

A set of tools to use and manage any OrientDB instance from PHP.

Orient includes:

- the HTTP protocol binding
- the query builder
- the data mapper ( Object Graph Mapper )

If you don't know [OrientDB](http://www.orientechnologies.com/) take a look at its [Documentation](http://orientdb.com/docs/last/index.html).

After cloning
-------------

[](#after-cloning)

In order to be able to run the examples and the test suite provided by Orient, you must first enter the root of the cloned repository and initialize all the needed dependencies using [Composer](http://getcomposer.org/). We provide an utility script in the `bin/` subdirectory to ease this process so you can just do the following:

```
$ ./bin/initialize-dependencies.sh

```

Current status of the binding
-----------------------------

[](#current-status-of-the-binding)

The binding is complete: it is an HTTP client wrapper with some methods bound to OrientDB's HTTP interface.

Its usage is straightforward:

```
$parameters = christianascone\OrientDB\Binding\BindingParameters::create('http://admin:admin@127.0.0.1:2480/demo');
$orient = new christianascone\OrientDB\Binding\HttpBinding($parameters);
$output = $orient->query("SELECT FROM Address");

foreach ($output->getResult() as $address) {
    var_dump($address->street);
}

```

Use the PHP5.3 standard autoloader ().

Current status of the query builder
-----------------------------------

[](#current-status-of-the-query-builder)

The query-builder is finished, in the future we will consider the integration of OrientDB Graph Edition: .

To take advantage of the QB you only have to instantiate a Query object:

```
use christianascone\OrientDB\Query\Query;

$query = new Query();
$query->from(array('users'))->where('username = ?', "admin");

echo $query->getRaw();      // SELECT FROM users WHERE username = "admin"

```

The Query object incapsulates lots of sub-commands, like SELECT, DROP, GRANT, INSERT and so on...

You can use also those commands:

```
use christianascone\OrientDB\Query\Command\Select;

$select = new Select(array('users'));
echo $select->getRaw();     // SELECT FROM users

```

However, we strongly discourage this approach: commands will change, Query, thought as a facade, - hopefully - not.

You'd better take a look at the tests of the Query class and its subcommands to get a full overview of the available commands: in order to match OrientDB's native SQL-like synthax we tried to preserve names and stuff like that, but a few things have changed so far.

Current status of the mapper
----------------------------

[](#current-status-of-the-mapper)

We started working on the mapper and, right now, it is able to map OrientDB responses (converted in StdObject) to annotation-mapped POPOs. Also collections are hydrated properly.

However, it's under heavy work, so don't expect to be able to use it in a few weeks. Next steps are:

- hydrate OrientDB native data-type (it includes floats, embedded-set|link|list, embedded-map|link|list and many others...)
- provide a base repository class
- implementation of the persistence from the ODM to OrientDB

Utilities
---------

[](#utilities)

Orient incapsulates also a few utilities for PHP developers: on of them is an implementation of Dijkstra's algorithm.

```
use christianascone\OrientDB\Graph\Graph;
use christianascone\OrientDB\Graph\Vertex;
use christianascone\OrientDB\Graph\Algorithm\Dijkstra;

$graph = new Graph();

$rome = new Vertex('Rome');
$paris = new Vertex('Paris');
$london = new Vertex('London');

$rome->connect($paris, 2);
$rome->connect($london, 3);
$paris->connect($london, 1);

$graph->add($rome);
$graph->add($paris);
$graph->add($london);

$algorithm = new Dijkstra($graph);
$algorithm->setStartingVertex($rome);
$algorithm->setEndingVertex($london);

var_dump($algorithm->solve());

```

Tests
-----

[](#tests)

The test suite can be launched simply by executing `phpunit` from the root directory of the repository.

By default the suite does not perform integration tests to verify the correct behaviour of our implementation against a running instance of OrientDB. Since integration tests are marked using the [@group](http://www.phpunit.de/manual/current/en/appendixes.annotations.html#appendixes.annotations.group)annotation, they can be enabled by default via `phpunit.xml` by adding a comment to the `integration` group in the list of excluded groups or, if you just want to execute them on a single execution basis, first load fixtures with this script

```
php ./test/Integration/fixtures/load.php

```

followeb by launching the suite with the additional `--group` argument:

```
phpunit --group __nogroup__,integration

```

It is also possible to generate a HTML report showing the code health of the library using `PHP_CodeBrowser` paired with the following dependencies (in addition to `phpunit`):

- phpcpd
- phpdcd
- phploc
- phpmd
- phpdepend
- phpcb

Executing `./bin/report.sh` from the root directory of the repository will generate the report in `log/report/index.html`.

Requirements
------------

[](#requirements)

These are the requirements in order to use the library:

- PHP &gt;= 5.3.3
- OrientDB &gt;= 1.2.0

In order to launch the test suite PHPUnit 3.6 is required.

Tracker &amp; software lifecycle
--------------------------------

[](#tracker--software-lifecycle)

See:

Further documentation
---------------------

[](#further-documentation)

If you want to take a look at a fancy PHPDoc documentation you can use doxygen:

```
sudo apt-get install doxygen

```

and then use the script provided under the docs directory:

```
doxygen docs/orient.d

```

which will generate technical documentation under the folder docs/html.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

17

Last Release

3117d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2da159a79cbb2e56749f0e372c9f36b2636320f55535422d43c09d8a55be45f1?d=identicon)[christianascone](/maintainers/christianascone)

---

Top Contributors

[![christianascone](https://avatars.githubusercontent.com/u/14952409?v=4)](https://github.com/christianascone "christianascone (58 commits)")

---

Tags

orientdb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/christianascone-php-orientdb-http/health.svg)

```
[![Health](https://phpackages.com/badges/christianascone-php-orientdb-http/health.svg)](https://phpackages.com/packages/christianascone-php-orientdb-http)
```

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[hautelook/alice-bundle

Symfony bundle to manage fixtures with Alice and Faker.

19519.4M34](/packages/hautelook-alice-bundle)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M263](/packages/ssch-typo3-rector)[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

134391.5k12](/packages/rector-rector-src)[h4cc/alice-fixtures-bundle

Symfony2 Bundle for loading fixture data with the Alice library.

76314.2k7](/packages/h4cc-alice-fixtures-bundle)[ostico/phporient

PHPOrient is a good php driver based on the binary protocol of OrientDB.

6972.0k3](/packages/ostico-phporient)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
