PHP This! A Beginners Guide to Learning Object Oriented PHP

PHP This! A Beginners Guide to Learning Object Oriented  PHP
Автор книги: id книги: 1635392     Оценка: 0.0     Голосов: 0     Отзывы, комментарии: 0 934,65 руб.     (9,09$) Читать книгу Купить и скачать книгу Купить бумажную книгу Электронная книга Жанр: Программы Правообладатель и/или издательство: Ingram Дата добавления в каталог КнигаЛит: ISBN: 9781456615291 Скачать фрагмент в формате   fb2   fb2.zip Возрастное ограничение: 0+ Оглавление Отрывок из книги

Реклама. ООО «ЛитРес», ИНН: 7719571260.

Описание книги

PHP This! is a beginners book for developers who are new to object oriented PHP web development.<br><br>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.<br><br>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. <br><br>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:<br><br>Chapter 1: Why Read This Book <br><br>Sample Job Description: Jr. PHP Developer <br><br>The Eight Primary Categories of JQuery Features <br><br>Why Learn Object Oriented PHP <br><br>Six Primary Advantages to Learning Object Oriented Programming <br><br>Chapter 2: PHP Objects & Classes <br><br>Overview &ndash; The Confusion of First Learning Object Oriented Theory <br><br>Explanation of a Class <br><br>Explanation of an Object <br><br>Instantiation <br><br>$this Variable <br><br>Access Modifiers <br><br>Inheritance <br><br>Method Overriding <br><br>Invoking Parent Methods <br><br>Horizontal Inheritance – Using Traits <br><br>Encapsulation <br><br>Polymorphism <br><br>Polymorphism vs. Method Overloading <br><br>Polymorphism vs. Method Overriding <br><br>Late Binding / Dynamic Binding <br><br>Chapter 3: PHP Magic Methods <br><br>Chapter 4: Abstract Classes & Methods <br><br>abstract Keyword <br><br>Extending sub-classes from an Abstract Base Class <br><br>Abstract Methods <br><br>final Keyword <br><br>Chapter 5: Interfaces <br><br>PHP Interfaces <br><br>Explanation of What Interfaces Are and Why They are Useful <br><br>interface & implements Keywords <br><br>Implementing Multiple Interfaces <br><br>Programming to the Interface <br><br>Design-by-Contract <br><br>Chapter 6: Static Methods & Properties <br><br>The static Modifier <br><br>The Scope Resolution Operator <br><br>Static Properties <br><br>Static Methods <br><br>Singleton Pattern <br><br>Late Static Binding <br><br>The static Keyword vs. the self Keyword <br><br>Chapter 7: PHP Error Control & Exception Handling <br><br>The Built-in Exception Class <br><br>Throwing an Exception <br><br>The try-catch-finally Block <br><br>Setting the Desired Error Sensitivity Level <br><br>Setting Error Reporting 67<br><br>Error Reporting Sensitivity Levels <br><br>Logging Options <br><br>Chapter 8: The Model-View-Controller Design Pattern <br>Understanding the Model-View-Controller Design Pattern <br><br>Model <br><br>View <br><br>Controller <br>The MCV URL Structure & URL Mapping <br><br>Using the .htaccess File <br>The index.php File <br>The MVC Folder Structure <br>Custom MVC Application – Restaurant Menu Management Application <br><br>Showing the Menu <br><br>Adding a Menu Item <br><br>Assigning a Menu Item to a Menu <br><br>Editing/Deleting Menu Items <br>Download the Source Code for the Custom MVC Application (Restaurant Menu Management Application)

Оглавление

Michelle Gosney. PHP This! A Beginners Guide to Learning Object Oriented PHP

Introduction

Why Read This Book

Why Learn Object Oriented PHP

Chapter 1: PHP Objects & Classes. Initial Confusion

PHP Objects & Classes

Instantiation

$this Variable

Access Modifiers

Inheritance

Method Overriding

Invoking Parent Methods

Horizontal Inheritance – Using Traits

Encapsulation

Polymorphism

Method Overloading

Method Overriding

Late Binding / Dynamic Binding

Chapter 2: Magic Methods

__construct()

Invoking Parent Constructor and Destructor

__destruct()

__get(), __set(), __isset()

__call()

__sleep()

__wakeup()

__clone()

Chapter 3: Abstract Classes & Methods

abstract Keyword

Abstract Methods

final Keyword

Chapter 4: PHP Interfaces

interface & implements Keywords

Chapter 5: The static Modifier

Static Properties

Singleton Pattern

Late Static Binding

Chapter 6: PHP Error Control & Exception Handling

The Built-in Exception Class

Throwing an Exception

Setting the Desired Error Sensitivity Level

Error Reporting Sensitivity Levels

Displaying Startup Errors

Logging Errors

Identifying the Log File

Setting the Maximum Log Line Length

Ignoring Repeated Errors

Ignoring Errors Originating from the Same Location

Storing Most Recent Error in a Variable

Opening the Logging Connection

Logging Options

Closing the Logging Connection

Chapter 7: Model – View – Controller. Understanding the Model-View-Controller Design Pattern

Model

View

Controller

The MVC URL Structure & URL Mapping

The index.php File

MVC Folder Structure

View

The Display Class

Controller

Model

Develop the Functionality to Add New Menu Items

Controller for the Add Menu Item Feature

Model for the Add Menu Item Feature

View for the Add MenuItem Feature

View Templates for the Add MenuItem Feature

Display Manager for the Add MenuItem Feature

View Templates for the Assign MenuItem-to-Menu Feature

Controller for the Assign MenuItem-to-Menu Feature

Model for the Assign MenuItem-to-Menu Feature

Display Manager for the Assign MenuItem-to-Menu View

Controller for the Edit/Delete MenuItem Feature

Model for the Edit MenuItem Feature

General Markup for the Edit MenuItem Page

View Templates for the Edit MenuItem Feature

Display Manager for the Edit View

Chapter 8: The Reflection API

Chapter 9: The PEAR Library

Install PEAR in a Windows Zend Framework Environment

Install PEAR in a Windows XAMPP Environment

Install PEAR in a Windows WAMP Environment

Install PEAR on Mac OS

Update System PATH

Update PHP Include Path

Install PEAR on Linux

Using PEAR - EXAMPLE. Text -> CAPTCHA_Numeral

Chapter 10: Unit Testing with PHPUnit

Installing PHPUnit

Install PHPUnit on Windows on Zend Framework Environment

Install PHPUnit on Windows on XAMPP Environment

Install PHPUnit on Mac OS X

Install PHPUnit on Linux

Test Fixtures

Test Phases

Writing Test Cases

Assertion Methods

Testing Data from HTML Form Submissions

Test Suites

Mocks and Stubs

Create a Mock Class

Running PHPUnit from Eclipse Without Plug-ins

Chapter 11: Source Code Management with Subversion

Setting Up a Subversion Server and Client on Windows

Adding Your Source Code the First Time

Creating a Copy to Work On

Updating and Committing Your Working Copy

Setting up TortoiseSVN

Exporting a Release

Tagging & Branching a File

Setting Up a Subversion Server and Client on Mac OS X. Download Subversion

Unpack and Install Subversion

Add Subversion to Your Path

Setting up the Subversion Repository

Creating a Subversion Project

Checking Out Files from Subversion

Updating and Committing Changes

Adding and Removing Files and Directories. Adding a File

Removing a File

Adding a Directory

Removing a Directory

Tagging & Exporting a Release

Branching & Merging a Project. Creating a Branching

Merging

Graphical User Interfaces

Setting Up a Subversion Server on a Linux Server

Step 1:

Step 2:

Step 3:

Step 4:

Step 5:

Step 6:

Step 7:

Updating and Committing Changes

Adding and Removing Files and Directories. Adding a File

Removing a File

Adding a Directory

Removing a Directory

Tagging & Exporting

Branching & Merging a Project. Creating a Branching

Merging

Summary

Appendix A: Bibliography. Web Resources

Books

Appendix B: Setting Up Your Development Stack

Install Zend Server CE (Community Edition)

MySQL Workbench 5.2 CE

Setting Up Your Integrated Development Environment

Отрывок из книги

A few years ago when I first sat down to evaluate the new features of PHP 5.3 I knew I was facing a challenging learning curve. It had been about 9 years since I had used PHP and at that time it was an easy to use, loosely typed, scripting language. My first thought while exploring the new features of PHP 5.3 was that “wow, little PHP is all grown up.”

In an effort to get caught up in a hurry, I looked at several books and on-line forums and quickly grew frustrated with the same boring and monotonous way that these advanced concepts were explained and the poor examples that were used. Having an extensive background in object-oriented programming I continuously thought to myself “what if someone is trying to learn these concepts without much of an object-oriented background?”

.....

So to summarize the three PHP access Modifiers in a more formal way:

private restricts the access to the class itself. Only methods that are part of the same class can access private members. Let’s look at an example below:

.....

Добавление нового отзыва

Комментарий Поле, отмеченное звёздочкой  — обязательно к заполнению

Отзывы и комментарии читателей

Нет рецензий. Будьте первым, кто напишет рецензию на книгу PHP This! A Beginners Guide to Learning Object Oriented PHP
Подняться наверх