2017 © Pedro PelĂĄez
 

library direct-silex-provider

An ExtJS Direct service provider for Silex.

image

oaugustus/direct-silex-provider

An ExtJS Direct service provider for Silex.

  • Monday, March 2, 2015
  • by oaugustus
  • Repository
  • 3 Watchers
  • 1 Stars
  • 135 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Silex-Direct

An ExtDirect service provider for Silex., (*1)

Installation

Through Composer:, (*2)

{
   require: {
       "oaugustus/direct-silex-provider": "dev-master"
   }        
}

Usage

To get up and running, register DirectExtension and manually specify the bundles directories that will be the controllers exposed to ExtDirect., (*3)

Register the DirectServiceProvider;, (*4)

// app.php
...

$app->register(new Direct\DirectServiceProvider(), array());

Expose the controllers., (*5)

// app.php
...

// method call without formHandler
$app->post('/controller/method', function() use($app){
    return $app["request"]->get("name");
})->direct();

// method call with formHandler
$app->post('/controller/secondMethod', function(){

})->direct(true);

Add the api call into your page templates:, (*6)

<script type="text/javascript" src="{{url('directapi')}}"></script>

Ready, now call the remote method from ExtJS code:, (*7)

Actions.Controller.method({name: 'Otavio'}, function(result, ev){
    if (ev.type != 'exception')
        console.log(result);
});

The Versions

02/03 2015

dev-master

9999999-dev http://github.com/oaugustus/silex-direct

An ExtJS Direct service provider for Silex.

  Sources   Download

MIT

The Requires

 

silex extjs extdirect

08/06 2013

0.1.x-dev

0.1.9999999.9999999-dev http://github.com/oaugustus/silex-direct

ExtDirect extension to Silex Micro-framework

  Sources   Download

MIT

The Requires

 

extjs extdirect