PHP This!

By Michelle Gosney

  • Release Date : 2013-06-05
  • Genre : Computers
  • FIle Size : 12.88 MB


PHP This! PHP This! is a beginners book for developers who are new to object oriented PHP web development.

This goal of PHP This! is to teach the PHP skills needed to be a junior PHP developer. These skills include an introduction to object oriented PHP theory and instruction on how to apply that theory to build a full custom MVC application, unit testing with PHPUnit and code management with SVN.

The instruction provided by this book also applies to experienced software engineers with expertise in other languages who have not had the opportunity yet to learn object oriented PHP or to those who are new to web development altogether. 

Object Oriented concepts can be confusing at first that is why PHP This! provides a simple way to explain a confusing subject. The clear explanations and examples will quickly teach you what Object Oriented PHP is and how to use it, test it and manage it. Some key chapters and subjects include:

Chapter 1: Why Read This Book 

Sample Job Description: Jr. PHP Developer 

The Eight Primary Categories of JQuery Features 

Why Learn Object Oriented PHP 

Six Primary Advantages to Learning Object Oriented Programming 

Chapter 2: PHP Objects & Classes 

Overview – The Confusion of First Learning Object Oriented Theory 

Explanation of a Class 

Explanation of an Object 


$this Variable 

Access Modifiers 


Method Overriding 

Invoking Parent Methods 

Horizontal Inheritance - Using Traits 



Polymorphism vs. Method Overloading 

Polymorphism vs. Method Overriding 

Late Binding / Dynamic Binding 

Chapter 3: PHP Magic Methods 

Chapter 4: Abstract Classes & Methods 

abstract Keyword 

Extending sub-classes from an Abstract Base Class 

Abstract Methods 

final Keyword 

Chapter 5: Interfaces 

PHP Interfaces 

Explanation of What Interfaces Are and Why They are Useful 

interface & implements Keywords 

Implementing Multiple Interfaces 

Programming to the Interface 


Chapter 6: Static Methods & Properties 

The static Modifier 

The Scope Resolution Operator 

Static Properties 

Static Methods 

Singleton Pattern 

Late Static Binding 

The static Keyword vs. the self Keyword 

Chapter 7: PHP Error Control & Exception Handling 

The Built-in Exception Class 

Throwing an Exception 

The try-catch-finally Block 

Setting the Desired Error Sensitivity Level 

Setting Error Reporting 67

Error Reporting Sensitivity Levels 

Logging Options 

Chapter 8: The Model-View-Controller Design Pattern 
Understanding the Model-View-Controller Design Pattern 



The MCV URL Structure & URL Mapping 

Using the .htaccess File 
The index.php File 
The MVC Folder Structure 
Custom MVC Application - Restaurant Menu Management Application 

Showing the Menu 

Adding a Menu Item 

Assigning a Menu Item to a Menu 

Editing/Deleting Menu Items 
Download the Source Code for the Custom MVC Application (Restaurant Menu Management Application)