[dev] [commits] Horde branch master updated. 8e8a82cf1aae00f678ed499e5a377643ec2142e8

Jan Schneider jan at horde.org
Wed Jan 30 21:42:19 UTC 2013


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>> Zitat von Michael M Slusarz <slusarz at horde.org>:
>>
>>> The branch "master" has been updated.
>>> The following is a summary of the commits.
>>>
>>> from: dfd72ded5877647720fc160757f08a939d13e863
>>>
>>> b008562 [mms] Add Horde_Url_Data class.
>>> 8e8a82c Use Horde_Url_Data to create data URL information
>>>
>>> -----------------------------------------------------------------------
>>>
>>> commit b008562e7026160e4ec3ef0a6b95114604c54217
>>> Author: Michael M Slusarz <slusarz at horde.org>
>>> Date:   Mon Jan 28 17:36:28 2013 -0700
>>>
>>>   [mms] Add Horde_Url_Data class.
>>>
>>> framework/Url/lib/Horde/Url/Data.php         |   96  
>>> ++++++++++++++++++++++++++
>>> framework/Url/package.xml                    |   22 ++++---
>>> framework/Url/test/Horde/Url/UrlDataTest.php |   68 ++++++++++++++++++
>>> 3 files changed, 177 insertions(+), 9 deletions(-)
>>> create mode 100644 framework/Url/lib/Horde/Url/Data.php
>>> create mode 100644 framework/Url/test/Horde/Url/UrlDataTest.php
>>>
>>> http://git.horde.org/horde-git/-/commit/b008562e7026160e4ec3ef0a6b95114604c54217
>>>
>> Why the factory method? Doesn't make much sense IMO.
>
> It's an analogue to the constructor.  So that parsing and creating  
> are both one step actions.  This is a bit unwieldy:
>
> $a = new Horde_Url_Data();
> $a->data = 'foo';
> $a->type = 'text/plain';
> echo strval($a);
>
> This is much clearer to understand what is happening:
> strval(new Horde_Url_Data('text/plain', 'foo'));

But it isn't even possible, because the ctor only takes the $data  
parameter. Anyway, it doesn't matter anymore now, because I already  
released it.
-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the dev mailing list