Yes, as per usual in programming: If you do something over and over again and it's kinda cumbersome, you have an opportunity for optimization.
As for this concrete example - I haven't yet seen enough from the codebase in-depth to make a call, but I would agree that a more concise input handler would probably make sense. A good reference might be: http://www.phptherightway.com/#data_filtering
Like other things discussed earlier, all this talk is definitely v2.0 talk, of course.
-David
On Tue, Sep 3, 2013 at 2:24 PM, Cor Bosman cor@xs4all.nl wrote:
- Linebreaks separating variable declaration blocks
Discussion: https://github.com/roundcube/roundcubemail/pull/109#discussion-diff-6064999
I think for this, we will end up reverting some of the changes that I made. But we still have to discuss the details - It's just mainly about the other devs telling me in what instances it would be permissible to separate blocks.
I agree with Thomas that maybe this should happen in two phases. A lot of the time those variable declaration blocks should maybe be done in a totally different way anyways so maybe we should worry about that when we get to that. Maybe when we get to use composer more and can actually re-use composer elements from other projects.
Example..
$headers = rcube_utils::get_input_value('_header', rcube_utils::INPUT_POST);
To me this seems overly convoluted. Ive always wondered why there isnt an input class.
$header = Input::post('_header');
Cor
Roundcube Development discussion mailing list dev@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/dev