With the new version 3 of StarUML there wasn’t a UML to PHP Generator yet. I’ve decided to take the existing one for Java (https://github.com/staruml/staruml-java) and rewrote it so it would generate PHP code instead: https://github.com/nahakiole/staruml-php I then submitted it to the StarUML extension Repository and to this date it has already been downloaded over 600 times. If you find … Read More
At the moment I’m working on setting up a Confluence installation for a Quality Management System. On of the tasks is to find all external broken links in Confluence. For this I created a little command line script to automate this task.
In this article I will help you build a simple webscraper in PHP. For the base we will use the php library fabpot/goutte. To get started with our project we will install the dependency manager composer. You can find out how to install composer on their official website: https://getcomposer.org/ After the installation you should be able to use composer on the command … Read More
The Github repository domnikl/DesignPatternsPHP has a list of design patterns and their implementation in PHP. It shows the UML diagram for the pattern and explains the purpose of the pattern. AbstractFactory To create series of related or dependent objects without specifying their concrete classes. Usually the created classes all implement the same interface. The client of the abstract factory does not care … Read More
In this tutorial I’d like to show you how to install and switch between multiple PHP version on Ubuntu. You should also be able to use this on other distribution, but you may have to adjust some of the commands and paths (apt-get, apache2). So let’s do this. To get set-up we first need to update our packet list if … Read More
If you found a PHP snippet which you want to test or if you want to try something quickly, I just found your perfect tool. The name’s Run-PHP-Code This little tool provides you with a editor and the output in the browser. So you can just run your snippet to test how it works. Also it’s really handy to showcase something, as … Read More
If you ever wanted to check if your website was accessed via curl or wget and handle those cases differently you’ve come to the right place. In PHP this is really simple. Just use the snippet below to check the user agent and you’re done. I used this snippet to differentiate a web user from the command line on the … Read More