PHP Classes

File: app/controllers/jaxon/Process.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon for CodeIgniter   app/controllers/jaxon/Process.php   Download  
File: app/controllers/jaxon/Process.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Jaxon for CodeIgniter
CodeIgniter plugin to call PHP from with AJAX
Author: By
Last change: Updated the plugin and the controller.
Updated the Jaxon controller
Adapted to the new class hierarchy is jaxon-core.
Fixed code style.
Fixed code style.
Date: 3 years ago
Size: 1,618 bytes
 

Contents

Class file image Download
<?php
defined
('BASEPATH') or exit('No direct script access allowed');

class
Process extends CI_Controller
{
   
/**
     * Load the Jaxon and Session libraries.
     */
   
public function __construct()
    {
       
parent::__construct();
       
// Load the Jaxon library
       
$this->load->library('jaxon');
       
// Load the session library
       
$this->load->library('session');
    }

   
/**
     * Process a Jaxon request.
     *
     * The HTTP response is automatically sent back to the browser
     *
     * @return void
     */
   
public function index()
    {
       
$this->jaxon->callback()->before(function ($target, &$bEndRequest) {
           
/*
            if($target->isFunction())
            {
                $function = $target->getFunctionName();
            }
            elseif($target->isClass())
            {
                $class = $target->getClassName();
                $method = $target->getMethodName();
                // $instance = $this->jaxon->instance($class);
            }
            */
       
});
       
$this->jaxon->callback()->after(function ($target, $bEndRequest) {
           
/*
            if($target->isFunction())
            {
                $function = $target->getFunctionName();
            }
            elseif($target->isClass())
            {
                $class = $target->getClassName();
                $method = $target->getMethodName();
            }
            */
       
});

       
// Process the Jaxon request
       
if($this->jaxon->canProcessRequest())
        {
           
$this->jaxon->processRequest();
        }
    }
}