PHPackages                             jrsaunders/giraffe - 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. jrsaunders/giraffe

ActiveLibrary

jrsaunders/giraffe
==================

Ajax: Server/Client Helper/Router

v1.0.1(9y ago)0137proprietaryPHPPHP &gt;=7.0

Since Feb 24Pushed 9y ago2 watchersCompare

[ Source](https://github.com/JRSaunders/Giraffe)[ Packagist](https://packagist.org/packages/jrsaunders/giraffe)[ RSS](/packages/jrsaunders-giraffe/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Giraffe
=======

[](#giraffe)

**Ajax: Server/Client Helper/Router**

[![Latest Stable Version](https://camo.githubusercontent.com/a2181038feb07feb34cea70be8579e688cdb561da5529e8f12b6d89815efe946/68747470733a2f2f706f7365722e707567782e6f72672f6a727361756e646572732f676972616666652f762f737461626c65)](https://packagist.org/packages/jrsaunders/giraffe)[![Total Downloads](https://camo.githubusercontent.com/c338fbc1a9bf13c35eb3266c40c54f2c17692fb49b6699ffea39113fe636edde/68747470733a2f2f706f7365722e707567782e6f72672f6a727361756e646572732f676972616666652f646f776e6c6f616473)](https://packagist.org/packages/jrsaunders/giraffe)[![Latest Unstable Version](https://camo.githubusercontent.com/037743fc03e1d6dd4dd46dd4b307a7d7a086267bc100671a25e9221a0e2fce16/68747470733a2f2f706f7365722e707567782e6f72672f6a727361756e646572732f676972616666652f762f756e737461626c65)](https://packagist.org/packages/jrsaunders/giraffe)[![License](https://camo.githubusercontent.com/340b59011a1306cab78b0e40798f40f91f835cea7853b372c63b6e52e460a21c/68747470733a2f2f706f7365722e707567782e6f72672f6a727361756e646572732f676972616666652f6c6963656e7365)](https://packagist.org/packages/jrsaunders/giraffe)

supports:

- DataTables
- Ajax Uploads
- Redirects
- Notifications
- Modals
- General all purpose Ajax
- Debugging

Install: Server Side
--------------------

[](#install-server-side)

**index.php / bootstrap.php**

Add this to one or both of these php files:

```
use Giraffe\Giraffe;
Giraffe::setEnvironment(ENVIRONMENT);
Giraffe::setProject('MY SITE NAME OR PRJECT NAME');
Giraffe::setDeveloperEmails(
     'me@mailprovider.co.uk,my_partner@theirmailprovider.co.uk'
);
Giraffe::setJSDIR(__DIR__ . '/public/assets/js/giraffe/');

```

\###Put a route in place to get to an ajax controller

Here is an example of how that ajax controller may look:

```
namespace MyApp\Ajax;

use Giraffe\Giraffe;

class Ajax
{
    public function someMethodYouRouteToForAjax()
    {
        $allowedControllers = [Login::class, Dashboard::class];
        new Giraffe($allowedControllers, 'MyApp\\Controller\\', 'ajax', MYAPP_PATH . '/Views/ajax/');
    }
}

```

Install: Client/Front End Side
------------------------------

[](#install-clientfront-end-side)

Create a folder named giraffe in your js directory. Then `chown apache:apache giraffe` or `chmod 777 giraffe`.

Giraffe can update your Javascript File when composer updates the package.

Giraffe is designed to be used in conjunction with JQuery.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3330d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f68d705c23942cba02774d2232b2fe40db024cac603b778fcb12c8ed84048c6?d=identicon)[JRSaunders](/maintainers/JRSaunders)

---

Top Contributors

[![JRSaunders](https://avatars.githubusercontent.com/u/6054445?v=4)](https://github.com/JRSaunders "JRSaunders (28 commits)")

### Embed Badge

![Health badge](/badges/jrsaunders-giraffe/health.svg)

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

PHPackages © 2026

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