PHP code example of iekadou / php_pjaxr

1. Go to this page and download the library: Download iekadou/php_pjaxr library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

iekadou / php_pjaxr example snippets


    use Iekadou\Pjaxr\Pjaxr as Pjaxr;
    ...
    Pjaxr::set_current_namespace('Pjaxr.Home');
	

// View:
if (!Pjaxr::matches('Pjaxr')) {
    // Do everything you need only for the whole site.
}
if (!Pjaxr::matches('Pjaxr.Home')) {
    // Do everything you need to handle the home page.
}

// Head-Template:
if (!Pjaxr::matches('Pjaxr')) {
    <html>
    <head>
    // Scripts and Stylesheets could be loaded here, no need to reload them when changing the page
    <script...
    <link...
 } else {