Hi,

First of all, forgive me for my lack of clue as my only experience
with Symfony has been accumulated by poking around the SF2 sandbox out
of curiosity and attraction to such a wonderful way of doing things.

I have REST services and the classic controller seems rather
inappropriate for them. I end up with code such as:

class DummyController extends Controller
{
    public function xyzAction($a, $b, $c)
    {
        switch ($this->container['request']->getMethod())
        {
            case 'GET':
                ...
                break;
            case 'POST':
                ...
                break;
            case 'PUT':
                ...
                break;
            case 'DELETE':
                ...
                break;
        }
    }
}

Which seems rather odd. My question is: is there a plan to provide an
extended controller to facilitate REST services ? I know it is easily
feasible and I would surely volunteer to write that piece of code. My
idea is to provide something along the lines of:

class DummyController extends RestController
{
    public function xyzActionGet($a, $b, $c)
    {
    }

    public function xyzActionPost($a, $b, $c)
    {
    }

    public function xyzActionPut($a, $b, $c)
    {
    }

    public function xyzActionDelete($a, $b, $c)
    {
    }
}

Does that seem reasonable ? Maybe I am missing something.

Thank you,
NABN.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to