Login   Register  
PHP Classes
elePHPant
Icontem

File: framework/Controller_v5.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of sunish  >  RSPA  >  framework/Controller_v5.php  >  Download  
File: framework/Controller_v5.php
Role: Example script
Content type: text/plain
Description: Controller_v5.php
Class: RSPA
Process browser events on the server using AJAX
Author: By
Last change:
Date: 8 years ago
Size: 1,628 bytes
 

Contents

Class file image Download
<?php
/**
*
*
*  Author : Sunish Kumar M.V
*
*  This is licenced under LGPL licence.

**/
    
require_once("rspaconf.inc.php");

$className $_REQUEST['__class'];
$methordName =  $_REQUEST['__methord'];
 
    
// Wenn Pfad bermittelt wurde
 
if (!empty($_REQUEST['__pfad'])){$X_Pfad base64_decode($_REQUEST['__pfad']);}else{$X_Pfad $RSPA['class_folder'];}
        if (
$_REQUEST['__include_file']){$_REQUEST['__include_file'] = base64_decode($_REQUEST['__include_file']);}
 

 include (
"../components/Form.class.php");
 
 
$filename $X_Pfad.$className.$RSPA['class_extension'];

 require_once(
$filename);
 
 
 
$class = new ReflectionClass($className);
 
$inst $class->newInstance();
 
$method = new ReflectionMethod($className"initialize");
 
$method->invoke($inst);
 
 
// $inst->initialize();
 

 
$method = new ReflectionMethod($className$methordName);

 if(! empty(
$_REQUEST['__parameters'])){
     
     if(
method_exists($inst,"invokeArgs")){
         
$arg =  $_REQUEST['__parameters'];
         
$method->invokeArgs($inst,$arg);
     }
     else{
         
//Invokes for max 10 parameters 
         
         
$arg =  $_REQUEST['__parameters'];
         
         
$indx count($arg);
         
$ar1 array_fill($indx9'');
         
$arg array_merge($arg,$ar1);
         
$method->invoke($inst,$arg[0],$arg[1],$arg[2],$arg[3],$arg[4],$arg[5],$arg[6],$arg[7],$arg[8],$arg[9]);
     }
 }
 else {
     
$method->invoke($inst);
 }
 
 if( (( isset(
$_REQUEST['__autocomplete']))?$_REQUEST['__autocomplete']:"") == "yes"){
     print(
$inst->getAutoCompleteChoice());
     
 }
 else{
     
header('Content-type: text/xml');
     print(
$inst->getXml());
 }
?>