-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi folks,
say, I have a route like the following:
files(\/.*)?
The reverse entry for it is:
files%s
What I know wanna do is to ommit the parameter in some calls, so I can
either do
$this->url(array(), 'files');
or
$this->url(array('path' => $something)), 'files');
I've looked over the vsprintf() function, but couldn't there there stuff
about optional parameters. If that is not possible, I guess I have to
create two seperate routes, which wouldn't be a nice way.
Best Regards,
Ben Scholzen
Michał Minicki schrieb:
> Colin Guthrie <[EMAIL PROTECTED]> napisał(a):
>
>> Anyway, I'm using Zend_Controller_Router_Route_Regex, and have found
>> some odd behaviour that I'm not 100% sure is deliberate and wonder if
>> someone could confirm this is expected or if it's actually a bug!
>
> Why don't you look at the code and the test suite? Regex route does this as
> a first line when matching path_info:
>
> $path = trim(urldecode($path), '/');
>
> First of all it's being done in order to be consistent with the rest of the
> routes which behave similarly.
>
> Secondly, there were some issues reported on JIRA regarding the issue - you
> can read them if you want additional info. As far as I remember regex route
> used to do only ltrim in the beginning.
>
>> Col
>
>
>
- --
...................................
: ___ _ ___ ___ ___ _ ___ :
: | \ /_\ / __| _ \ _ (_) \ :
: | |) / _ \\__ \ _/ / | |) | :
: |___/_/:\_\___/_| |_|_\_|___/ :
:........:........................:
: Web : http://www.dasprids.de :
: E-mail : [EMAIL PROTECTED] :
: Jabber : [EMAIL PROTECTED] :
: ICQ : 105677955 :
:........:........................:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIGgba0HfT5Ws789ARAl1MAJ9z9l03PJEyV+SOhj0h1Y+TDKrI1ACfTqVj
+RFjPh3Ca450IlrHslXT9xc=
=qkCB
-----END PGP SIGNATURE-----