michalsn / CodeIgniter-PJAX

Enable the use of PJAX in CodeIgniter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeIgniter PJAX

Build Status

What is PJAX? It's a jquery plugin. For more information visit the plugin page. This hook enable the use of PJAX in CodeIgniter.

Installation

Copy application/core/MY_Input.php and application/hooks/Pjax.php to your project.

Add below code to application/config/hooks.php file

$hook['post_controller'][] = array(
        'class'    => 'Pjax',
        'function' => 'initialize',
        'filename' => 'Pjax.php',
        'filepath' => 'hooks'
);

Enable hooks in your application/config/config.php file, by setting $config['enable_hooks'] variable to TRUE.

Limitations

PJAX container must be an id attribute.

Example

Working example can be found here.

Testing

composer install
./vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information.

About

Enable the use of PJAX in CodeIgniter

License:MIT License


Languages

Language:PHP 100.0%