Articles


Injecting a model instance into a controllers action

5 months ago by: matt

This is a continuation/update from my Phalcon PHP route model binding post. My pull request has since been merged and made its way into Phalcon 3.0.0. This is taken from the documentation I wrote for this feature here.


From 3.0.x onwards the dispatcher comes with an option to handle this internally for all models passed into a controller action.

use Phalcon\Mvc\Dispatcher;

$dispatcher = new Dis...

Continue reading


Compiling Nginx from source - Ubuntu 14.04

1 year ago by: matt

More of a reference for myself but may come in useful for someone else too.

Start off by downloading the latest version you need. In my case im going for 1.9.12. I usually throw all of this into /usr/local/src.
Keep in mind, I am running all of this as sudo, if you dont know what your doing do some reading on the linux superuser.

cd /usr/local/src
wget http://nginx.org/download/nginx-{VERSION}.tar.g...

Continue reading


Pacific Crest Trail 2016 - Gear

1 year ago by: matt

In 2012 I came across a movie called "Into the wild" that has stuck with me ever since. It follow Christopher McCandless on a trip to get to the Alaskan wilderness. At the time I had just started my skydiving, B.A.S.E jumping training so I had to focus on that but the idea had been planted.

Last year I watched "wild" which was filmed along the Pacific Crest Trail and it was the missing piece I need...

Continue reading


Phalcon PHP Paginator with URL parameters

1 year ago by: matt

So this is an issue that a few people on the forums and github have reported. Common scenario would be searching or filtering where you are adding additional parameters into your request. Something like the following:

http://mydomain.com/articles?sort=desc


Now you would expect the following output if you have your Paginator set up correctly:

<?php echo $page->next ?>

//Output
?page=2&sort=desc


How...

Continue reading


PHP Dublin Meetup - January 2016

1 year ago by: matt

First meetup of 2016 and probably the best one I've attended so far. Rasmus Lerdorf himself gave a great presentation/introduction to PHP 7 which came with examples and benchmarks. I also loved the deployment example without loosing requests in progress. Obviously there is still no similar solution for deployments with schema changes but one can dream...

PHP 7.0.2 has already been released so there...

Continue reading