X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..6746dc89c47ed01b165cc1152533605f97eb8e8d:/examples/direct/php/api.php diff --git a/examples/direct/php/api.php b/examples/direct/php/api.php index de708093..f595275e 100644 --- a/examples/direct/php/api.php +++ b/examples/direct/php/api.php @@ -7,10 +7,17 @@ $actions = array(); foreach($API as $aname=>&$a){ $methods = array(); foreach($a['methods'] as $mname=>&$m){ - $md = array( - 'name'=>$mname, - 'len'=>$m['len'] - ); + 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; } @@ -25,7 +32,7 @@ $cfg = array( 'actions'=>$actions ); -echo 'Ext.app.REMOTING_API = '; +echo 'Ext.ns("Ext.app"); Ext.app.REMOTING_API = '; echo json_encode($cfg); echo ';';