X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..HEAD:/examples/direct/php/api.php diff --git a/examples/direct/php/api.php b/examples/direct/php/api.php new file mode 100644 index 00000000..f595275e --- /dev/null +++ b/examples/direct/php/api.php @@ -0,0 +1,38 @@ +&$a){ + $methods = array(); + foreach($a['methods'] as $mname=>&$m){ + if (isset($m['len'])) { + $md = array( + 'name'=>$mname, + 'len'=>$m['len'] + ); + } else { + $md = array( + 'name'=>$mname, + 'params'=>$m['params'] + ); + } + if(isset($m['formHandler']) && $m['formHandler']){ + $md['formHandler'] = true; + } + $methods[] = $md; + } + $actions[$aname] = $methods; +} + +$cfg = array( + 'url'=>'php/router.php', + 'type'=>'remoting', + 'actions'=>$actions +); + +echo 'Ext.ns("Ext.app"); Ext.app.REMOTING_API = '; + +echo json_encode($cfg); +echo ';';