PHPackages                             jaxon-php/jaxon-yii - 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-yii

ActiveLibrary[Framework](/categories/framework)

jaxon-php/jaxon-yii
===================

Jaxon library integration for the Yii Framework

v4.0.0(3y ago)11.7kBSD-3-ClausePHP

Since Jul 15Pushed 1y ago1 watchersCompare

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

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

Jaxon integration for the Yii framework
=======================================

[](#jaxon-integration-for-the-yii-framework)

This package integrates the [Jaxon library](https://github.com/jaxon-php/jaxon-core) into the Yii framework. It requires the version 2.0.11 or newer.

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

[](#installation)

Add the following lines in the `composer.json` file, and run the `composer update` command.

```
"require": {
    "jaxon-php/jaxon-yii": "^4.0"
}
```

Or run the `composer require jaxon-php/jaxon-yii` command.

This package provides a filter that must be attached to routes to pages where the Jaxon features are enabled.

This is an example of a Yii controller using the Jaxon library.

```
namespace app\controllers;

use Yii;
use yii\web\Controller;
use Jaxon\Yii\Filter\JaxonConfigFilter;

class DemoController extends Controller
{
    public function behaviors()
    {
        return [
            [
                'class' => JaxonConfigFilter::class,
                'only' => ['index', 'jaxon'],
            ],
        ];
    }

    /**
     * Process Jaxon ajax requests. This route must be the same that is set in the Jaxon config.
     */
    public function actionJaxon()
    {
        $jaxon = jaxon()->app();
        if(!$jaxon->canProcessRequest())
        {
            // Jaxon failed to find a plugin to process the request
            return; // Todo: return an error message
        }

        return $jaxon->processRequest();
    }

    /**
     * Insert Jaxon js and css codes in the page.
     */
    public function actionIndex()
    {
        // Set the layout
        $this->layout = 'demo';
        // Get the Jaxon module
        $jaxon = jaxon()->app();

        return $this->render('index', [
            'jaxonCss' => $jaxon->css(),
            'jaxonJs' => $jaxon->js(),
            'jaxonScript' => $jaxon->script()
        ]);
    }
}
```

Before it prints the page, the controller calls the `$jaxon->css()`, `$jaxon->js()` and `$jaxon->script()` functions, to get the CSS and javascript codes generated by Jaxon which are inserted into the page.

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

[](#configuration)

The Jaxon library settings are defined in the `@app/config/jaxon.php` file, and 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 Jaxon 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 valueDescriptiondirectory@app/jaxon/classesThe 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)

### The Jaxon classes

[](#the-jaxon-classes)

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

This is an example of a Jaxon class, defined in the `@app/jaxon/ajax/HelloWorld.php` file.

```
namespace Jaxon\Ajax;

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-yii/issues
- Source Code: github.com/jaxon-php/jaxon-yii

License
-------

[](#license)

The package is licensed under the BSD license.

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity74

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

Recently: every ~290 days

Total

26

Last Release

367d ago

Major Versions

v1.0.4 → 2.0-beta.12016-12-30

v2.0.2 → v3.0.02019-11-11

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

v4.0.0 → v5.x-dev2024-06-30

### 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 (88 commits)")

---

Tags

phpajaxyiiJaxon

### Embed Badge

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

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

###  Alternatives

[dragon-code/support

Support package is a collection of helpers and tools for any project.

239.6M106](/packages/dragon-code-support)[luyadev/luya-module-cms

The LUYA CMS module provides a full functional Content Management System for adding contents based on blocks.

32178.4k18](/packages/luyadev-luya-module-cms)[jaxon-php/jaxon-laravel

Jaxon library integration for the Laravel framework

101.8k4](/packages/jaxon-php-jaxon-laravel)[hprose/hprose-yii

Hprose Server for Yii 2

357.2k](/packages/hprose-hprose-yii)[phpmv/php-mv-ui

A JQuery and UI library for php and php MVC frameworks

3320.4k3](/packages/phpmv-php-mv-ui)

PHPackages © 2026

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