Zendcasts Forum

A community of developers who work with the Zend Framework and other enterprise PHP technologies

You are not logged in.

#1 2010-03-16 04:53:47

Ryan Johnston
Member
Registered: 2010-03-08
Posts: 21

Jon, can you please please please help?? Zend_Routes bug??

Hey Jon and co,

So I've begun a project with ZF and have hit a snag.. Really really really need some help here.

http://forums.zend.com/viewtopic.php?f=69&t=5793

There is my post, there is either a bug with Zend_Routes or I've done something wrong?

Cheers,
Ryan

Offline

#2 2010-03-16 18:50:14

ryan.horn
Member
From: Buffalo, NY
Registered: 2009-09-08
Posts: 41
Website

Re: Jon, can you please please please help?? Zend_Routes bug??

I've run across this before and I believe it's an issue with how the route matching works. See http://framework.zend.com/issues/browse/ZF-2986

I'm not sure of a proper solution, but you can use the old fashioned array notation to achieve the same effect:

http://www.mysite.com/controller/action/?key[]=value&key[]=value2

Offline

#3 2010-03-16 23:29:33

Ryan Johnston
Member
Registered: 2010-03-08
Posts: 21

Re: Jon, can you please please please help?? Zend_Routes bug??

Mmm we really would like to stick wtih /key/value1/key/value2

The idea is chaining for a shopping cart so...

/cart/add/productname/add/anotherproduct

I can't find any solutions, anyone have any ideas how to subclass the Router to achieve this?

Maybe a tutorial for Jon as it's widely requested. Being able to mimic the default behavior so you can include you're on (eg: Language Prefixing whilst still being able to handle parameters & identical keys)

Offline

#4 2010-03-28 16:30:02

Jon Lebensold
Administrator
Registered: 2009-06-27
Posts: 279

Re: Jon, can you please please please help?? Zend_Routes bug??

sounds like you just need to serialize it and then base36 encode it... then unbase it and unserialize the data structure back again...

that would be one way of doing it...

you could also just do key/comma,delimited,values

and then just parse out the commas...

Offline

Board footer

Powered by FluxBB