Some interesting code samples made by Tobias Ranft 2015. You can see the result at . The whole project is continuously integrated with codeship.io and deployed to phpcodesamples.ranft.biz.
Have a look at my CV. And don't hesitate to contact me for any kind of request.
It's just some components I needed to publish this as a php application site. For more information see the details
The litte finger excercise every coder knows. The goal is to count, but leave out some numbers. My solution the OOP way.
Not serious to solve it in OOP, but it was on my bucket list.
$ git clone git@github.com:devtop/php.codesamples.git
You'll need to have apache2 and php>=5.4 .
<VirtualHost *:80>
ServerName php.codesamples
DocumentRoot /your/path/to/the/project/php.codesamples
SetEnv APPLICATION_ENV "development"
<Directory /your/path/to/the/project/php.codesamples/public>
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
mod_rewrite has to be activated.
$ sudo a2enmod rewrite
$ ./setup/build.docker.sh
$ ./setup/run.docker.sh
Then you can get projects result at http://localhost:81/ .
- Coffeebar
- Route Match Object
- Unhandled edgecases in router
- Using Prophecy for mocking
- Config objects
- OOP Dispatcher
- Application runner
- 404 error site
- Multiple URL for one route
- Prime numbers with regex
- Sequence Problem
- Simple request time measurement
The js- and css-library stuff is not originated by me. I use Twitter Bootstrap and jQuery to fresh the design up.
Source code can be found on github.com. It' free to use in other contexts.