PHPackages                             jaxon-php/jaxon-cake - 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. [Framework](/categories/framework)
4. /
5. jaxon-php/jaxon-cake

ActiveLibrary[Framework](/categories/framework)

jaxon-php/jaxon-cake
====================

Jaxon library integration for the CakePHP 3 framework

v4.0.0(3y ago)189BSD-3-ClausePHP

Since Dec 31Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/jaxon-php/jaxon-cake)[ Packagist](https://packagist.org/packages/jaxon-php/jaxon-cake)[ Docs](https://github.com/jaxon-php/jaxon-cake)[ RSS](/packages/jaxon-php-jaxon-cake/feed)WikiDiscussions main Synced 2mo ago

READMEChangelog (10)Dependencies (2)Versions (26)Used By (0)

Jaxon Library for CakePHP
=========================

[](#jaxon-library-for-cakephp)

This package integrates the [Jaxon library](https://github.com/jaxon-php/jaxon-core) into the CakePHP framework.

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

[](#installation)

The version 4 of the package requires CakePHP version 4.

Install the package with `Composer`.

```
composer require jaxon-php/jaxon-cake ^5.0
```

Or

```
{
    "require": {
        "jaxon-php/jaxon-cake": "^5.0",
    }
}
```

And run `composer install`.

Load the Jaxon plugin in the `src/Application.php` file.

```
    /**
     * Load all the application configuration and bootstrap logic.
     *
     * @return void
     */
    public function bootstrap(): void
    {
        ...

        // Load more plugins here
        $this->addPlugin(\Jaxon\Cake\JaxonPlugin::class, ['routes' => true]);
    }
```

Load the Jaxon view helper in the `src\View\AppView.php` file.

```
    /**
     * Initialization hook method.
     *
     * Use this method to add common initialization code like loading helpers.
     *
     * e.g. `$this->loadHelper('Html');`
     *
     * @return void
     */
    public function initialize(): void
    {
        $this->loadHelper('Jaxon/Cake.Jaxon');
    }
```

Routing and middlewares
-----------------------

[](#routing-and-middlewares)

This package provides two middlewares, one to load the Jaxon config, and the other to process Jaxon requests. The Jaxon config middleware must be attached to the routes to all the pages where the Jaxon features are enabled, while the later must be attached to the controller action that processes Jaxon requests.

```
use Jaxon\Cake\Middleware\ConfigMiddleware as JaxonConfigMiddleware;

$routes->scope('/', function (RouteBuilder $builder) {
    // Register Jaxon middlewares
    $builder->registerMiddleware('jaxon.config', new JaxonConfigMiddleware());

    // Apply the "jaxon.config" middleware to routes to pages that require Jaxon.
    $builder->applyMiddleware('jaxon.config');

    ...
});
```

Usage
-----

[](#usage)

The settings in the `config/jaxon.php` config file are separated into two sections. The options in the `lib` section are those of the Jaxon core library, while the options in the `app` sections are those of the CakePHP application.

The following options can be defined in the `app` section of the config file.

NameDescriptiondirectoriesAn array of directory containing Jaxon application classesviewsAn array of directory containing Jaxon application viewsBy default, the `views` array is empty. Views are rendered from the framework default location. There's a single entry in the `directories` array with the following values.

NameDefault valueDescriptiondirectoryROOT . '/jaxon/App'The directory of the Jaxon classesnamespace\\Jaxon\\AppThe namespace of the Jaxon classesseparator.The separator in Jaxon class namesprotectedempty arrayPrevent Jaxon from exporting some methodsUsage
-----

[](#usage-1)

### The javascript and CSS code

[](#the-javascript-and-css-code)

The Jaxon view helper provides functions to insert the Jaxon javascript and CSS code into a page.

```

```

```

```

```

```

### The Jaxon classes

[](#the-jaxon-classes)

The Jaxon classes can inherit from `\Jaxon\App\CallableClass`. By default, they are located in the `ROOT/jaxon/App` dir of the CakePHP application, and the associated namespace is `\Jaxon\App`.

This is an example of a Jaxon class, defined in the `ROOT/jaxon/App/HelloWorld.php` file.

```
namespace Jaxon\App;

class HelloWorld extends \Jaxon\App\CallableClass
{
    public function sayHello()
    {
        $this->response->assign('div2', 'innerHTML', 'Hello World!');
    }
}
```

Contribute
----------

[](#contribute)

- Issue Tracker: github.com/jaxon-php/jaxon-cake/issues
- Source Code: github.com/jaxon-php/jaxon-cake

License
-------

[](#license)

The package is licensed under the BSD license.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity73

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

Recently: every ~290 days

Total

24

Last Release

322d ago

Major Versions

v2.0.2 → v3.0.02019-11-11

v3.1.1 → v4.0-beta.12022-04-19

v4.x-dev → v5.0.0-beta.12025-06-24

### Community

Maintainers

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

---

Top Contributors

[![feuzeu](https://avatars.githubusercontent.com/u/15174329?v=4)](https://github.com/feuzeu "feuzeu (82 commits)")

---

Tags

phpcakephpajaxJaxon

### Embed Badge

![Health badge](/badges/jaxon-php-jaxon-cake/health.svg)

```
[![Health](https://phpackages.com/badges/jaxon-php-jaxon-cake/health.svg)](https://phpackages.com/packages/jaxon-php-jaxon-cake)
```

###  Alternatives

[cakephp/bake

Bake plugin for CakePHP

11211.2M158](/packages/cakephp-bake)[cakephp/acl

Acl Plugin for CakePHP framework

109553.9k15](/packages/cakephp-acl)[cakephp/queue

Queue plugin for CakePHP

36257.9k12](/packages/cakephp-queue)[jaxon-php/jaxon-laravel

Jaxon library integration for the Laravel framework

101.8k4](/packages/jaxon-php-jaxon-laravel)[cakedc/cakephp-phppm

PHP PM bridge for CakePHP

221.7k](/packages/cakedc-cakephp-phppm)

PHPackages © 2026

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