Aug 29
If you program PHP code with Eclipse PDT, you surely missed the auto generate getter and setter refactoring option which is known from the JDT. So you had to write hundreds of thousands of lines of code to create those methods for the uncountable amount of data objects you wrote until now.
To speed things up, here’s a solution with templates:
Click Window – Preferences – PHP – Templates and create a new template with the following content:
/**
* Set the ${word_selection} value
* @param unknown_type $$${word_selection}
*/
public function set${variable}($$${word_selection}) {
$$this->${word_selection} = $$${word_selection};
}
/**
* Returns the ${word_selection} value.
* @return unknown_type
*/
public function get${variable}() {
return $$this->${word_selection};
}
${cursor}
To use this template, type the template shortcut you have chosen in a PHP file of your choice (e.g. “getset”), followed by a variable name of your class (z.B. getsetcolor). Now highlight the word “color” (or yours, if different) and then press ctrl+space. Voila, there you have the desired methods. The cursor is on the right position for the variable type in the javadoc comment. Type “string” (or your type) and then jump to the method names with tab. You should type e.g. “Color” (starts with capital letter) and that’s it!
This method should save you at least 1-2 minutes per property – try it!
Aug 26
Wer im TYPO3 auch schon mal ein Modul im Extension Manager erstellt hat, wird das Problem kennen: Man hast nicht wirklich viel Einfluss auf die letztendliche Position im Backend. Man kann zwischen einem neuen Modul, dem File-, Web-, Help-, User- oder Tools-Menü wählen. Das klingt jetzt vielleicht viel und ausreichend, aber was wenn es zusätzlich ein anderes Modul im Backend gibt welches durch eine Extension angelegt wurde? Weiterlesen »
Aug 25
Ja klar, da hätte ich auch eher drauf kommen können: Einfach schnell einen “kostenlosen” Service anbieten, so wie der Herr Marco Krüger aus Stuttgart, und dann durch die Nutzerzahlen abkassieren. “Foren-City.de” ist sein Service. Dieser bietet kostenlose Foren an und der werte Herr verdient ja offensichtlich trotzdem Geld. Über Firefox-Downloads via Google. Der Titel seiner Anzeige ist “MozilIa Fire|Fox Download”. Wer genauer hinschaut erkennt, dass da nicht alle Buchstaben so sind wie sie sein sollten. Für mich ganz klar ein weiterer Fall für die Kategorie SCHWEINEREI! Warum er nicht einfach nur “normale” Google-Anzeigen anzeigt versteh ich nicht.
PS: Da der gute Mann so wahnsinnig einfallsreich ist, sind nicht mal die Bilder von ihm sondern von Photocase – na dann…
Aug 14
Wer, wie ich, bei o2 einen Handyvertrag “Genion mit Homezone” hat, wird das kennen: die geschickte und richtige Wahl der Adresse für den Ursprungsort der Homezone kann darüber entscheiden, ob man nur die versprochenen 200 Meter in jede Richtung erhält, oder ob daraus einige Kilometer werden. Weiterlesen »
Aug 11
I just don’t get it! After putting some effort in a website, which was missing in a developer community, and getting almost no feedback, a lot of people are still downloading scriptsfrom eSteak.net – 6000 hits per month. So my contribution to the MooTools-Community was nonsense? Now I had to read this. Sorry, but I am a bit pissed about that. I think, I’ll open the platform for other js frameworks instead of more work for the MooTools community which obviously doesn’t accept this website. Hopefully the other developer communities are not that exclusive…