PHP PaaS

Great to see that Google App Engine and Engine Yard now both support PHP (v5.4) on their cloud platforms too. GAE could use some more loaded extensions, but it’s a good start. Google App Engine for PHP →Google App Engine: PHP: Getting Started →Google App Engine: PHP: Detailed Documentation → Google App Engine for PHP […]

bramus/router — A lightweight and simple object oriented PHP Router

For one of the courses I teach I was in need of a PHP Router. Having explored the available routers out there I found they either were: Outdated Not object oriented(sorry Klein (which has been updated by now, but wasn’t at the time)) Rather bad at the separation of concerns(sorry Ham & Klein; a router […]

Silex Code Fiddles/Examples

For the course Webscripting2 I’m lecturing at ikdoeict.be/KaHo Sint-Lieven, we’re working with Silex. Next to the slidedeck explaining Silex, all examples are freely available on GitHub (links at the bottom of this post) The collection of examples start with the very basics of Silex and introduce more routing options and services as they continue. Basic:The […]

Événement — PHP Event Dispatcher

Événement is a very simple event dispatching library for PHP. It has the same design goals as Silex and Pimple, to empower the user while staying concise and simple. Concise indeed. At the core it’s a tad above 50 lines of codes. Listening for events: $emitter->on(‘user.created’, function (User $user) use ($logger) { $logger->log(sprintf(“User ‘%s’ was […]

Silex $app['autoloader']->registerNamespace() deprecated

The past few days I’ve been playing around with Silex, a micro PHP Framework. At a certain point I got stuck in the process when using a custom controller: the darn class just wouldn’t load and the (otherwise excellent) documentation on the Silex site has not mention on how to load it. Most of the […]

Composer – Dependency Manager for PHP

Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Think npm install but then for PHP { “require”: { “monolog/monolog”: “1.2.*” } } $ composer install Plays nice with packages that support PSR-0 autoloading. […]

Guzzle — PHP HTTP Client

Guzzle is a framework that includes the tools needed to create a robust web service client, including: Service descriptions for defining the inputs and outputs of an API, resource iterators for traversing paginated resources, batching for sending a large number of requests as efficiently as possible. <?php require_once ‘vendor/autoload.php’; use Guzzle\Http\Client; // Create a client […]

Faker

Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you. Uses formatters for the different types of data (e.g. names, addresses, etc) you want […]