PHPackages                             medlib/yaz - 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. medlib/yaz

ActiveLibrary

medlib/yaz
==========

Medlib is a searche Library

v2.2(9y ago)41682MITPHPPHP &gt;=5.5.9

Since Feb 4Pushed 9y ago4 watchersCompare

[ Source](https://github.com/medlib-v2/yaz)[ Packagist](https://packagist.org/packages/medlib/yaz)[ Docs](https://www.medlib.fr)[ RSS](/packages/medlib-yaz/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

YAZ Query Builder
-----------------

[](#yaz-query-builder)

### Installation Laravel

[](#installation-laravel)

#### Dependencies

[](#dependencies)

[medlib/marcxml](https://github.com/medlib-v2/marcxml)

You can install this package by using [Composer](http://getcomposer.org), running this command:

```
    composer require medlib/yaz
```

The next required step is to add the service provider to config/app.php :

```
'providers' => [
    ...
    Medlib\Yaz\Providers\YazServiceProvider::class,
    Medlib\MarcXML\Providers\ParserServiceProvider::class,
]
```

```
'aliases' => [
    ...
    'Yaz' => Medlib\Yaz\Facades\Yaz::class,
    'Query' => Medlib\Yaz\Facades\Query::class,
    'MarcXML' => Medlib\MarcXML\Facades\MarcXML::class,
]
```

### Publish

[](#publish)

The last required step is to publish views and assets in your application with :

```
    php artisan vendor:publish
```

If you get the error

```
    Nothing to publish for tag []!
```

Then run this command :

```
    php artisan config:clear
```

### Examples

[](#examples)

- Request with a return type of `BibliographicRecord` (all records):

    ```
    use Medlib\Yaz\Query\YazQuery;

    $this->results = YazQuery::create()
    ->from('SUDOC')
    ->where('au="totok" and ti="Handbuch"')
    ->orderBy('au ASC')
    ->all();

    ```
- Request with a return type of `BibliographicRecord` (one record):

    ```
    use Medlib\Yaz\Query\YazQuery;

    $this->results = YazQuery::create()
    ->from('SUDOC')
    ->where('au="totok" and ti="Handbuch"')
    ->first();

    ```
- Request with a return type of `BibliographicRecord` (limit):

    ```
    use Medlib\Yaz\Query\YazQuery;

    $this->results = YazQuery::create()
    ->from('BNF')
    ->where('au="totok" and ti="Handbuch"')
    ->limit(0,10)
    ->all();

    ```
- Request with a return type of `string` (all records):

    ```
    use Medlib\Yaz\Query\YazQuery;
    use Medlib\Yaz\Record\YazRecords;

    $this->results = YazQuery::create()
    ->from('BNF')
    ->where('au="totok" and ti="Handbuch"')
    ->orderBy('au ASC')
    ->all(YazRecords::TYPE_STRING);

    ```
- Request with a return type of `xml` equal to `BibliographicRecord` (all records):

    ```
    use Medlib\Yaz\Query\YazQuery;
    use Medlib\Yaz\Record\YazRecords;

    $this->results = YazQuery::create()
    ->from('connection_name')
    ->where('au="totok" and ti="Handbuch"')
    ->orderBy('au ASC')
    ->all(YazRecords::TYPE_XML);

    ```

#### Allowed parameters

[](#allowed-parameters)

##### Type:

[](#type)

```
- TYPE_STRING
- TYPE_RAW
- TYPE_XML
- TYPE_SYNTAX
- TYPE_ARRAY

```

OrderDescriptionASCSort ascendingIASCSort ascending, Case insensitive sortingSASCSort ascending, Case sensitive sortingDESCSort descendingIDESCSort descending, Case insensitive sortingSDESCSort descending, Case sensitive sorting### Pagination

[](#pagination)

- Action:

    ```
    use Medlib\Yaz\Pagination\Paginator;
    use Medlib\Yaz\Record\YazRecords;

    $pagination = new Paginator('BNF', 10);

    $pagination->getQuery()
    ->where('au="totok"')
    ->orderBy('ti ASC');

    $pagination->setPage($request->get('page', 1));

    $pagination->render();

    ```
- Template:

    ```
      Count: echo $pagination->getNbResults();
      foreach($pagination->getResults(YazRecords::TYPE_STRING) AS $result):
            echo $result;
      endforeach;

    ```

### Required

[](#required)

- [YAZ Client 4|5](http://www.indexdata.dk/yaz/)
- [PHP YAZ](http://pecl.php.net/package/yaz)

Congratulations, you have successfully installed Yaz Query Builder !

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~29 days

Total

3

Last Release

3327d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25f868a0918dc0858167064721b5f0aa5276c77362d1e171e71d2ea8b1eee89c?d=identicon)[eldorplus](/maintainers/eldorplus)

---

Top Contributors

[![eldorplus](https://avatars.githubusercontent.com/u/1168143?v=4)](https://github.com/eldorplus "eldorplus (5 commits)")

---

Tags

yazz-3950librarybibliothèquefinder bookssearch booksyazz3950

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/medlib-yaz/health.svg)

```
[![Health](https://phpackages.com/badges/medlib-yaz/health.svg)](https://phpackages.com/packages/medlib-yaz)
```

###  Alternatives

[filp/whoops

php error handling for cool kids

13.2k402.4M1.4k](/packages/filp-whoops)[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[league/iso3166

ISO 3166-1 PHP Library

69536.3M116](/packages/league-iso3166)[dekor/php-array-table

PHP Library for printing associative arrays as text table (similar to mysql terminal console)

296.6M2](/packages/dekor-php-array-table)[ecentria/ecentria-rest-bundle

Goal of this bundle is to simplify process of creating APIs with Symfony. We use already well-coded libraries, combine them together to simplify process and not to re-invent the wheel. We've chose REST and HATEOS to have unified standards of API requests and responses.

142.4k](/packages/ecentria-ecentria-rest-bundle)

PHPackages © 2026

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