Usage in Ext JS/Sencha Touch

Bancha allows you to expose any CakePHP controller methods and then use it inside your Sencha Touch/Ext JS application. 

You can simply use this in your Ext JS/Sencha Touch application like this:

Bancha.getStub([controller name in singular]).
    [controller method name](param1,param2,...paramX,callback);

To use the example controller method from Expose in CakePHP simply execute:

Bancha.getStub('User').getAnonymizedRecord(id,callback);

Plugins (New in Bancha 2.2.0)

Bancha also supports to expose any controller inside a plugin. The exposing in CakePHP works exactly the same, to now use it you need to add the Plugin name as namespace. Let's say you have an plugin called Comments with  CommentsController, in which you exposed the favorte method. Use it as follows:

Bancha.getStub('Comment.Comment').favorite(id,callback);

Comments

Add a comment