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

Michael M Slusarz slusarz at horde.org
Wed Jan 30 17:55:21 UTC 2013


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'));

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list