From a41adda408c47c151d68a5be0cbd715cac4a0628 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 12 Sep 2014 21:20:05 +0200 Subject: [PATCH] added an alternative package and some links --- 1-setup.md | 4 ++-- 2-http.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/1-setup.md b/1-setup.md index 1aa5ab3..4a1174a 100644 --- a/1-setup.md +++ b/1-setup.md @@ -38,13 +38,13 @@ If there is an error, go back and try to fix it. If you only see a blank page, y Now would be a good time to commit your progress. If you are not already using git, set up a repository now. This is not a git tutorial so I won't go over the details. But using version control should be a habit, even if it is just for a tutorial project like this. -What you have set up now is called a `front controller`. All requests are going to the same file that then decides what to do with it. This is a very common software design pattern. +What you have set up now is called a [front controller](http://en.wikipedia.org/wiki/Front_Controller_pattern). All requests are going to the same file that then decides what to do with it. This is a very common software design pattern. ### Introducing composer Just because you are not using a framework does not mean you will have to reinvent the wheel every time you want to do something. For PHP there is a dependency manager called composer that you can use to pull in 3rd party packages for your application. -If you don't have composer installed already, head over to the website and install it. +If you don't have composer installed already, head over to the [website](https://getcomposer.org/) and install it. You can find composer packages for your project on [packagist](https://packagist.org/). Create a new file in your project root folder called `composer.json`. This is the composer configuration file that will be used to configure your project and it's dependencies. It must be valid json or composer will fail. diff --git a/2-http.md b/2-http.md index 437def1..0dc009a 100644 --- a/2-http.md +++ b/2-http.md @@ -6,6 +6,8 @@ The first package for the project will be an error handler that will provide you I like [filp/whoops](https://github.com/filp/whoops) , so I will show how you can install that package for your project. If you prefer another package, feel free to install that one. This is the beauty of programming without a framework, you have total control over your project. +An alternative package would be: [PHP-Error](https://github.com/JosephLenton/PHP-Error) + To install a new package, open up your `composer.json` and add the package to the require part. It should now look like this: ```