PHPackages                             geissler/csl - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. geissler/csl

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

geissler/csl
============

A php processor for the citation style language CSL (http://citationstyles.org)

112PHP

Since Mar 11Pushed 13y ago1 watchersCompare

[ Source](https://github.com/geissler/csl)[ Packagist](https://packagist.org/packages/geissler/csl)[ RSS](/packages/geissler-csl/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

This project is still in an early alpha state, nearly the half of the tests are failing. The goal is to implement a parser which is 100% compatible with the [CSL 1.0.1](http://citationstyles.org/downloads/specification.html "CSL")standard, 100% clean OOP and follows the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md "PSR-2") coding standard.

Installation
------------

[](#installation)

### Via [composer](http://getcomposer.org/ "composer")

[](#via-composer)

Add to the `composer.json` the `require` key and run composer install.

```
    "require" : {
        "geissler/csl": "dev-master"
    }

```

### Other

[](#other)

Make sure you are using a [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md "PSR-2")compatible autoloader.

Usage
-----

[](#usage)

Render a single bibliography entry.

```
    // include the composer autoloader
    require __DIR__ . '/vendor/autoload.php';

    use Geissler\CSL\CSL;

    // the name of the style you want to use
    $style = 'american-journal-of-archaeology';

    // the data do be displayed as a json array
    $input = '[
          {
              "id": "ITEM-1",
              "author" : [
                 {
                    "family": "Wallace-Hadrill",
                    "given": "Andrew"
                 }
              ],
              "issued": {
                  "date-parts": [
                      [
                          "2011"
                      ]
                  ]
              },
              "title": "The monumental centre of Herculaneum. In search of the identities of the public buildings",
              "container-title" : "Journal of Roman Archaeology",
              "volume" : "24",
              "page" : "121-160",
              "original-publisher-place" : "Ann Arbor, Mich.",
              "type": "article-journal"
          }
    ]';

    $csl = new CSL();
    echo $csl->bibliography($style, $input);

    // this will output the following
    Wallace-Hadrill, Andrew. 2011. "The monumental centre of Herculaneum. In search of the identities of the public
    buildings". Journal of Roman archaeology 24: 121-160.
```

As HTML

```

        Wallace-Hadrill, Andrew. 2011. "The monumental centre of Herculaneum. In search of the
        identities of the public buildings". Journal of Roman archaeology
        24: 121-160.

```

Configuration
-------------

[](#configuration)

The following options can be configured via the `configuration.ini`:

- locale-group
    - dir = Path to the locales files relative to the configuration.ini (standard: locale)
    - file = Filename of the language files, where LANGUAGE represents *de-DE*, *en-US* (standard: locales-LANGUAGE.xml)
    - dialects = A JSON array with the main dialects for languages spoken in more than one country.
- styles-group
    - dir = Path to the styles dir relative to the configuration.ini (standard: styles)

Styles and Locales
------------------

[](#styles-and-locales)

The files under *styles* are taken from the [CSL styles repository](https://github.com/citation-style-language/styles "CSL styles repository") and the files under *locales* are taken from the [CSL locales repository](https://github.com/citation-style-language/locales "CSL locales repository").

Tests and Comments
------------------

[](#tests-and-comments)

[![Build Status](https://camo.githubusercontent.com/7ddfd99ce9ad1f1a503899234b1815f2e8365d8f12a1723d7373d3130be97d5a/68747470733a2f2f7472617669732d63692e6f72672f67656973736c65722f63736c2e706e67)](https://travis-ci.org/geissler/csl)

Most of the examples for the phpunit-tests under *tests/src*, all files in *tests/citeproc-test* and some comments are taken/copied from [CiteProc Test](https://bitbucket.org/bdarcus/citeproc-test "CiteProc Test"), **"the standard test bundle for use in CSL processor and style development"** written by Frank G. Bennett, Jr. and Bruce D'Arcus.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![geissler](https://avatars.githubusercontent.com/u/535572?v=4)](https://github.com/geissler "geissler (42 commits)")

### Embed Badge

![Health badge](/badges/geissler-csl/health.svg)

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

###  Alternatives

[symfony/polyfill-ctype

Symfony polyfill for ctype functions

4.0k1.0B192](/packages/symfony-polyfill-ctype)[php-tui/cassowary

Cassowary constraint solving algorithm implementation

211.1M1](/packages/php-tui-cassowary)[bileto/cronner

Simple tool which helps with maintenance of cron tasks.

752.2k](/packages/bileto-cronner)[athphane/filament-editorjs

This is my package filament-editorjs

184.8k](/packages/athphane-filament-editorjs)

PHPackages © 2026

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