schlitt.info - php, photography and private stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Author: Tobias Schlitt :Date: Thu, 19 Sep 2013 08:35:38 +0200 :Copyright: CC by-nc-sa === PHP === - Avoid an endless pifall During my current exam phase I'm working on some tiny private project to relax after learning. In there I'm using a main controller class, which implements a singleton pattern and initializes several sub-controllers while being created. The singletons purpose is, that the other controllers can access to main controller and its functionality whenever they need, without storing a reference each. The code for the singleton looked about like this: - Nice PHP code At our weekly usergroup meeting, which is taking place just right now, we again discussed our beloved topic, the Ternary Operator. I like that thing really much and I believe it makes code much more readable in a lot of cases. Anyway, I tend to stack ternary operators and I didn't even know, that the PHP manual recommends to not do that. I think this recommendation is only valid of you don't add appropriate braces, to indicate the precendences. Anyway, while having a beer, we thought about some more "funny" things you could do with it... For example, executing mutliple statements, within one section of the operator... here is the result: - Finally: Dericks year lookback Finally my friend Derick posted his usually PHP Look Back for the past year on his website. Thought, there were quite many look backs this time in the blog sphere, but after reading Dericks, I'm sure it is by far the best and most interessting. You will enjoy reading it, promised! - New design: dynamic-webpages.de My friend Wolfgang, the maintainer of the largest German PHP community website dynamic-webpages.de, just relaunched his new design. I like it very much and it looks really neat! :) - 1st step for becoming a Gentoo developer: eZ Components ebuilds When Sebastian left the Gentoo project, I decided to give it a try to become a Gentoo developer, which is a quite long process. Now I took the first step and provided new ebuilds for the recent eZ Components release 2006.2. Since I'm not an official developer, yet, these ebuilds are only available through the Gentoo PHP overlay, for now. I think Luca will put them into portage, or at least into php-testing, as soon as he is back from Christmas vacation. - Taint mode for PHP? Wietse Venema, the creator of the Postfix MTA, posted a proposal for a "taint mode" to the PHP internals list. Before commenting his proposal, I'd like to give a short intro about what a "taint mode" is: - PHP Documentor for VIM documented Because I had a talk about how to use VIM in respect to PHP source code editing, I took the time during the week, to write some extensive documentation for PDV, the PHP Documentor plugin for VIM. Additionally, I documented my VIM file type plugin, which is also available through the SVN of PDV. Take a look at the README.txt to learn more. - Horde Groupware Webmail Edition I like Horde quite much, it provides a comfortable web mailer (IMP) and some nice extra tools which give you a really comfortable groupware feeling with it... if you manage to set it up, once. By now, this has been quite a pain in the ass, which is why I did not upgrade my installation for a longer time. Though, now it was time to do so, because I already missed several security updates and bug fixes. - eZ Components class graph Jakob (a good friend of mine from the PHP UG Dortmund) has written a bash script to create class graphs (non UML conform, but what shalls?) from a PHP source directory. The resulting SVG is generated through GraphViz. He just ran the script on the eZ components. Here is a small excerpt: - Photos from IPC2K6? While I did not have a camera with me to this years International PHP Conference, I definitly saw lot's of flashes all of the conf. I wonder where all those photos have gone? Aaron already posted his on Flickr, but where is the rest?