source: trunk/web/addons/job_monarch/lib/extjs-30/examples/image-organizer/php/api.php @ 625

Last change on this file since 625 was 625, checked in by ramonb, 15 years ago

lib/extjs-30:

  • new ExtJS 3.0
File size: 624 bytes
Line 
1<?php
2require('config.php');
3header('Content-Type: text/javascript');
4
5// convert API config to Ext.Direct spec
6$actions = array();
7foreach($API as $aname=>&$a){
8        $methods = array();
9        foreach($a['methods'] as $mname=>&$m){
10                $md = array(
11                        'name'=>$mname,
12                        'len'=>$m['len']
13                );
14                if(isset($m['formHandler'])){
15                        $md['formHandler'] = true;
16                }
17                $methods[] = $md;
18        }
19        $actions[$aname] = $methods;
20}
21
22$cfg = array(
23    'url'=>'php/router.php',
24    'type'=>'remoting',
25        'actions'=>$actions,
26    'namespace'=>'Imgorg.ss'
27);
28
29echo 'Imgorg.REMOTING_API = ';
30
31echo json_encode($cfg);
32echo ';';
Note: See TracBrowser for help on using the repository browser.