PHPackages                             tsigularov/yii2-asset-xajax - 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. tsigularov/yii2-asset-xajax

ActiveLibrary[Framework](/categories/framework)

tsigularov/yii2-asset-xajax
===========================

Xajax for yii2 framework

091PHP

Since Jan 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/tsigularov/yii2-asset-xajax)[ Packagist](https://packagist.org/packages/tsigularov/yii2-asset-xajax)[ RSS](/packages/tsigularov-yii2-asset-xajax/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-asset-xajax
================

[](#yii2-asset-xajax)

Xajax for yii2 framework

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

[](#installation)

```
composer require tsigularov/yii2-asset-xajax @dev

```

make asset file @assets/XajaxAsset.php

```
namespace app\assets;

use Yii;
use yii\web\AssetBundle;
use yii\web\View;

class XajaxAsset extends AssetBundle
{
    public $sourcePath = '@vendor/tsigularov/yii2-asset-xajax/assets';

    public $js = [
//        'js/xajax_core.js',
    ];
}
```

make components file @app/components/XajaxComponent

```
namespace app\components;

use app\assets\XajaxAsset;
use \Yii;
use app\modules\warehouse\components\Url;
use yii\web\YiiAsset;

class XajaxComponent extends \yii\base\Component
{
    public $xajax_string;

    public $xajax_load = false;

    public function init()
    {

    }
    public function start($params){

        require_once Yii::getAlias('@vendor/tsigularov/yii2-asset-xajax/src/xajaxAIO.inc.php');
        $this->xajax_string = new \xajax();

        foreach ($params as $val) {
            $this->xajax_string->registerFunction(array($val[0], &$val[1], $val[2]));
        }

        $this->xajax_string->configure('debug', false);

        $this->xajax_string->configure('characterEncoding', 'utf-8');
        $this->xajax_string->configure('decodeUTF8Input', true);
        $this->xajax_string->configure('cleanBuffer', true);

        $this->xajax_load = true;

        $this->xajax_string->processRequest();

    }

    public function printJavascript()
    {
        if ($this->xajax_load) {
            $this->xajax_string->printJavascript(Yii::$app->view->assetBundles[XajaxAsset::className()]->baseUrl."/js/");
        }
    }
}
```

Start xajax component in any controller of your project

```
    public function init()
    {
        $params = array();
        $params[] = array("callBack",$this,"callBack");
        Yii::$app->xajax->start($params);
    }
```

add callBack function in the same controller

```
    public function callBack(){
        $response = new \xajaxResponse();

	$response->alert('This call back from server');

        return $response;
    }
```

Add print function in header of your project for example @view/header

```
   Yii::$app->xajax->printJavascript();
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/40c94c6dfb9a72e8888a55d6d948aa5ba35fc00cd5359caa213418d67bb8a422?d=identicon)[tsigularov](/maintainers/tsigularov)

### Embed Badge

![Health badge](/badges/tsigularov-yii2-asset-xajax/health.svg)

```
[![Health](https://phpackages.com/badges/tsigularov-yii2-asset-xajax/health.svg)](https://phpackages.com/packages/tsigularov-yii2-asset-xajax)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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