Keirua / php-oo-introduction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Object Oriented programming tutorial

PHP tutorial on how to work with classes, interfaces, namespaces, autoloading, exceptions...

The code is not meant to be used as-is, it goes along with a live presentation on the different concepts introduced here.

It is divided in several branches, each branch introducing new concepts :

  • 1-onefile : all the code is in one file, an abstract class on top (the point here is the syntax)
  • 2-onefile_interface: the abstract class is replaced by an interface
  • 3-onefile_factory: added a simple factory class with no error checking
  • 4-onefile_factory_exception : introducing exceptions for error handling
  • 5-autoloader : added simple autoloader
  • 6-autoloader-psr0 : moved the files into namespaces, adding a simple psr0 autoloader
  • 7-composer : composer and psr0 namespacing
  • 8-unit-tests : unit tests using phpunit as composer dependency

About


Languages

Language:PHP 100.0%