PHPackages                             bcdh/exist-db-rest-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. bcdh/exist-db-rest-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

bcdh/exist-db-rest-client
=========================

A Laravel client for querying and transforming results from eXist-db via REST API

v1.0.4(9y ago)3519↓40.8%2[1 issues](https://github.com/BCDH/Laravel-eXist-db-REST-Client/issues)GPL-2.0PHPPHP ~5.5|~7.0

Since May 10Pushed 9y ago2 watchersCompare

[ Source](https://github.com/BCDH/Laravel-eXist-db-REST-Client)[ Packagist](https://packagist.org/packages/bcdh/exist-db-rest-client)[ Docs](https://github.com/BCDH/Laravel-eXist-db-REST-Client)[ RSS](/packages/bcdh-exist-db-rest-client/feed)WikiDiscussions master Synced today

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

Laravel eXist-db REST Client
============================

[](#laravel-exist-db-rest-client)

A Laravel client for querying and transforming results from eXist-db via REST API.

Requirements:
-------------

[](#requirements)

- Laravel 5
- PHP 5.5
- PHP XSLT extension

```
sudo apt-get install php5-xsl
```

Installing
----------

[](#installing)

\####1. Add the service provider to your config/app.php:

```
BCDH\ExistDbRestClient\ExistDbServiceProvider::class

```

\####2. Publish your configuration file:

```
php artisan vendor:publish

```

\####3. Edit your connection credentials in `config/exist-db.php`

```
[
    'user'          => 'admin',
    'password'      => 'admin',

    'protocol'      => 'http',
    'host'          => 'localhost',
    'port'          => 8080,
    'path'          => 'exist/rest',

    /* alternatively, you can specify the URI as a whole in the form */
    // 'uri'=>'http://localhost:8080/exist/rest/'

    'xsl'           => 'no',
    'indent'        => 'yes',
    'howMany'       => 10,
    'start'         => 1,
    'wrap'          => 'yes'
]

```

Usage
-----

[](#usage)

```
use BCDH\ExistDbRestClient\ExistDbRestClient;

$q = 'for $cd in /CD[./ARTIST=$artist] return $cd';

$connection = new ExistDbRestClient();

$query = $connection->prepareQuery();
$query->bindVariable('artist', 'Bonnie Tyler');
$query->setCollection("CDCatalog");
$query->setQuery($q);

$result = $query->get();
$document = $result->getDocument();
```

#### Result formatting

[](#result-formatting)

[sabre/xml](http://sabre.io/xml/reading/) library is used for parsing xml result. You can pass an instance of \\Sabre\\Xml\\Service with your own (de)serializers to Query request methods

#### Result example

[](#result-example)

```
array(
    array(
        'name' => '{}CD',
        'value' => array(
            0 => array(
                'name' => '{}TITLE',
                'value' => 'Empire Burlesque',
                'attributes' => array(),
            ),
            1 => array(
                'name' => '{}ARTIST',
                'value' => 'Bob Dylan',
                'attributes' => array(),
            ),
            2 => array(
                'name' => '{}COUNTRY',
                'value' => 'USA',
                'attributes' => array(),
            ),
            3 => array(
                'name' => '{}COMPANY',
                'value' => 'Columbia',
                'attributes' => array(),
            )
        ),
        'attributes' =>  array (
            'favourite' => '1',
        ),
    ),
);
```

XLS transformations
-------------------

[](#xls-transformations)

- Single result

```
$result = $query->get();
$document = $result->getDocument();
$singleCd = $document[0];

$html = $result->transform(__DIR__ . '/xml/cd_catalog_simplified.xsl', $singleCd);
```

- Result

```
$result = $query->get();
$document = $result->getDocument();
$rootTagName = '{}catalog';

$html = $result->transform(__DIR__ . '/xml/cd_catalog_simplified.xsl', $document, $rootTagName);
```

###  Health Score

30

—

LowBetter than 67% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 82.4% 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 ~0 days

Total

4

Last Release

3603d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ed72f12bc3acab11c14f464ab6636722d5b5d926a0a99b42d0699ce77e9c0cb9?d=identicon)[ttasovac](/maintainers/ttasovac)

---

Top Contributors

[![zilbertrubb](https://avatars.githubusercontent.com/u/15800940?v=4)](https://github.com/zilbertrubb "zilbertrubb (14 commits)")[![ttasovac](https://avatars.githubusercontent.com/u/5304839?v=4)](https://github.com/ttasovac "ttasovac (3 commits)")

---

Tags

phplaravelrestxslteXist-dbxquery

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bcdh-exist-db-rest-client/health.svg)

```
[![Health](https://phpackages.com/badges/bcdh-exist-db-rest-client/health.svg)](https://phpackages.com/packages/bcdh-exist-db-rest-client)
```

###  Alternatives

[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

161.8k](/packages/laragear-api-manager)

PHPackages © 2026

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