[dev] [commits] Horde branch master updated. 40316ec5290525a65065aa6edc3d3c166c21dff5

Gunnar Wrobel wrobel at horde.org
Fri Aug 12 06:20:09 UTC 2011


Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting Gunnar Wrobel <wrobel at horde.org>:
>
>> Quoting "Michael J. Rubinsky" <mrubinsk at horde.org>:
>>
>>> The branch "master" has been updated.
>>> The following is a summary of the commits.
>>>
>>> from: 076904da083ba705201bb5464baed149571a0df2
>>>
>>> 40316ec Add Horde_Routes_Matcher
>>>
>>> -----------------------------------------------------------------------
>>>
>>> commit 40316ec5290525a65065aa6edc3d3c166c21dff5
>>> Author: Michael J Rubinsky <mrubinsk at horde.org>
>>> Date:   Sat Aug 6 11:58:45 2011 -0400
>>>
>>>   Add Horde_Routes_Matcher
>>>
>>>   Helper class for managing match dictionaries. Avoids having to
>>>   match the route multiple times in a MVC environment.
>>>   Thanks Gunnar :)
>>>
>>> framework/Routes/lib/Horde/Routes/Matcher.php |   88  
>>> +++++++++++++++++++++++++
>>> framework/Routes/package.xml                  |   20 +++---
>>> 2 files changed, 99 insertions(+), 9 deletions(-)
>>> create mode 100644 framework/Routes/lib/Horde/Routes/Matcher.php
>>>
>>> http://git.horde.org/horde-git/-/commit/40316ec5290525a65065aa6edc3d3c166c21dff5
>>
>> Looks good. I just wondered if this adds an optional dependency on  
>> Horde_Controller in Horde_Routes as the package is now at least  
>> aware of the Request class from the Controller package? Might  
>> alternatively be bridged by an interface declaration in  
>> Horde_Routes that just defined getPath() or some such.
>
> Horde_Controller_Request would then need to declare that it  
> implements that interface then, correct?

No. In that case Horde_Controller would need to be aware of  
Horde_Routes and you just reverse the situation but gain nothing.

I only briefly thought about it when I looked at the commit and I was  
thinking of just adding an interface to Horde_Routes. The association  
of Horde_Controller and Horde_Routes would then happen in the  
application using both components by extending the Request class and  
declaring that it implements the interface defined in Horde_Routes.  
But that is just my mind playing Java tricks on me ...

> Wouldn't that be a BC break between those two packages? Or, do you  
> mean to not type hint that parameter?

... and come to think of it that we are in fact coding PHP I would say  
that is the way to do it :) - remove the type hint and just clarify in  
the phpdoc that the request needs to have a getPath() method.

Cheers,

Gunnar

>
>
> -- 
> mike
>
> The Horde Project (www.horde.org)
> mrubinsk at horde.org
>
> -- 
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org

-- 
Core Developer
The Horde Project

e: wrobel at horde.org
t: +49 700 6245 0000
w: http://www.horde.org

pgp: 9703 43BE
tweets: http://twitter.com/pardus_de
blog: http://log.pardus.de



More information about the dev mailing list