S

SIMPLX Controller

By Lars Wallin (larscwallin)


Bug fixes:

Routing on Request headers is now working again :)

Updates:

Included a dependency to the Simplx Request package. This is self-resolving so its nothingyou need to worry about. Just makes it possible for me to update the Request extra withoutaffecting the Controller.

Load and loads of changes!

- Routing on any value in the Request Message.

- Support for Regular Expression matching in all fields.

- Possibility to set Routing Tables individually for System Events.

- Possibility to call the Controller as a Snippet.

Example of REST Routing Table

{  

  "contexts":{

      "web":{

          "constraints":{

               "path?/modResource/i":{

                     "rules":{

                          "method":{

                               "conditions":{

                                    "GET":"simplx.modapi.modresource.get",

                                    "POST":"simplx.modapi.modresource.create",

                                    "PATCH":"simplx.modapi.modresource.save",

                                    "DELETE":"simplx.modapi.modresource.delete"

                                 }

                           }

                       ...

Lars Wallin


New in SIMPLX Controller 0.8.0-beta4

SIMPLX Controller V0.8 

UPDATE 111109 

 NEW FEATURES: 

 - Added a whole bunch of modResource fields to the Request object. This means that you can route on stuff like:

pagetitle
template
parent
template
createdby
createdon
editedby
editedon
classkey uri contenttype published
pubdate
unpub
date alias
isfolder
type templatename 

UPDATE 111028

NEW FEATURES: 

- The Plugin now supports Property Sets

This is very cool as it makes it possible to run different configurations, e.g. Routing Tables, at

different System Events. The Plugin Property Set has the exact same signature as the Snippet set. 

UPDATE 111017 

NEW FEATURES: 

- Routing Instructions now take default parameters. Very handy! 

Example: "GET":["modapi.modchunk.get",{"myproperty":"My default value"}] 

The previous, simple Instruction assignment of course still works

"GET":"modapi.modchunk.default" 

UPDATE 111015 

NEW FEATURES: 

- Now supports regular expressions :D By default, the separator which tells the controller to use regex is "?". See the REST table below for an example. 

- You no longer have to specify a default routing constraint. If none is found the controller defaults to using the first constraint item in the routing table.

  • Loads of fixes :) 

    UPDATE 111005 

    NEW FEATURES: 

    - Better structure to the Routing Table definition by adding named object collections ("constraints","rules","conditions") instead of implicit type naming.

This means that you can basically encode the json and get this interface: 

 $context = $routingtable->constraints->web; 

 $header = $context->header; 

 if($header->rules->content-type){

print 'Hey, I can route on Content-Type!';

I will however shortly make a proper OO PHP Class to manage the Routing Tables. 

FIXES: 

- Default routing was broken. I have done a whole bunch of unit testing cases and it seems to be working now.

More

Information

Released
October 31, 2011
Supported Versions
2 – Current
Downloads
2,493
License
GPLv2

More from Lars Wallin

S
Simplx SuperBoxSelect

Simple Plugin fix to enable reordering of chosen items in the Multiselect…

View
S
Simplx Mirage

Simplx MirageSimplx Mirage is an alternative programming interface…

View
S
Simplx Request

Simplx Request 1.0 PLThis Snippet returns values from the current…

View
SIMPLX_RPC

AJAX made really simple SIMPLX RPC is a remote method invocation…

View