albertborsos / yii2-pjax
pjax extension for Yii 2.0
Installs: 778
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 4
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.1.0
- npm-asset/yii2-pjax: ~2.0
- yiisoft/yii2: ~2.0.0
Requires (Dev)
- codeception/codeception: ~2.3
- codeception/mockery-module: ^0.2.2
- codeception/specify: *
- codeception/verify: *
- mito/yii2-coding-standards: ~2.0.0@beta
- yiisoft/yii2-codeception: ~2.0
This package is auto-updated.
Last update: 2024-10-29 04:53:31 UTC
README
Yii 2.0 pjax extension
Classes in this extension are copied from Yii 2.0 repository
Installation
The preferred way to install this extension is through composer.
run
composer require --prefer-dist albertborsos/yii2-pjax
or for Yii 3.0
composer require albertborsos/yii2-pjax:1.0.x-dev
Usage
Use the pjax compatible request and response classes in your application's web.php
configuration file:
<?php return [ ... 'components' =>[ ... 'request' => [ 'class' => \albertborsos\pjax\web\Request::class, ], 'response' => [ 'class' => \albertborsos\pjax\web\Response::class, ], ... ], ... ];
Or
You can use your own Request
and Response
classes with the mandatory interfaces (\albertborsos\pjax\interfaces\RequestInterface
and \albertborsos\pjax\interfaces\ResponseInterface
) and with the optional traits (\albertborsos\pjax\traits\RequestTrait
and \albertborsos\pjax\traits\ResponseTrait
).