Contents

About the Authors

About the Technical Reviewer

Foreword

Acknowledgments

Introducing PHP

images Chapter 1: Object Orientation

Classes

Inheritance and Overloading

Miscellaneous “Magic” Methods

The __get and __set Methods

The __isset Method

The __call method

The __toString() method

Copying, Cloning, and Comparing Objects

Interfaces, Iterators, and Abstract Classes

Class Scope and Static Members

Summary

images Chapter 2: Exceptions and References

Exceptions

References

Summary

images Chapter 3: Mobile PHP

Mobile Variance

Detecting Devices

The User-Agent

Built-in PHP Support

Detecting Mobile Capabilities

WURFL

Rendering Tools

WALL

Image Resizing

Responsive CSS

Emulators and SDKs

Developing on an Android

Adobe Flash Builder for PHP

QR Codes

Summary

images Chapter 4: Social Media

OAuth

Twitter

Public Search API

Private REST API

Using Twitter OAuth to Tie into Your Site Login

More API Methods and Examples

Facebook

Adding a Link to Log Out of Facebook

Requesting Additional Permissions

Graph API

Summary

images Chapter 5: Cutting Edge

Namespaces

Namespaces and Autoload

Namespaces Conclusion

Anonymous Functions (Closures)

Nowdoc

Local goto Statements

Standard PHP Library

SPL Conclusion

Phar Extension

Summary

images Chapter 6: Form Design and Management

Data Validation

Uploading Files / Images

Image Conversion and Thumbnails

Regular Expressions

Multi-Language Integration

Summary

images Chapter 7: Database Integration I

Introduction to MongoDB

Querying MongoDB

Updating MongoDB

Aggregation in MongoDB

MongoDB Conclusion

Introduction to CouchDB

Using Futon

CouchDB Conclusion

Introduction to SQLite

SQLite Conclusion

Summary

images Chapter 8: Database Integration II

Introduction to MySQLi Extension

Conclusion of the MySQLi Extension

Introduction to PDO

Conclusion of the PDO

Introduction to ADOdb

ADOdb Conclusion

Full-Text Searches with Sphinx

Summary

images Chapter 9: Database Integration III

Introduction to Oracle RDBMS

The Basics: Connecting and Executing SQL

Array Interface

PL/SQL Procedures and Cursors

Working with LOB types

Connecting to DB Revisited: Connection Pooling

Character Sets in the Database and PHP

Summary

images Chapter 10: Libraries

SimplePie

TCPDF

Scraping Website Data

Google Map Integration

E-mail and SMS

gChartPHP: a Google Chart API Wrapper

Summary

images Chapter 11: Security

Never Trust Data

register_globals

Whitelists and Blacklists

Form Data

$_COOKIES, $_SESSION, and $_SERVER

Ajax Requests

Common Attacks

Same Origin Policy

Cross Site Scripting (XSS)

Cross-Site Request Forgery (CSRF)

Sessions

Preventing SQL Injection

The Filter Extension

php.ini and Server Settings

Server Environment

Hardening PHP.INI

Password Algorithms

Summary

images Chapter 12: Agile Development with Zend Studio for Eclipse, Bugzilla, Mylyn, and Subversion

Principles of Agile Development

The Agile Development Rally

Introduction to Bugzilla

Mylyn for Eclipse

Bugzilla and Mylyn Combined Within Eclipse

Extrapolating the Benefits

Summary

images Chapter 13: Refactoring, Unit Testing, and Continuous Integration

Refactoring

Small Refactorings

A Larger Legacy Code Example

Unit Testing

Continuous Integration

Continuous Integration Server

Version Control

Static Analysis

Build Automation

Jenkins Server Setup

Summary

images Chapter 14: XML

XML Primer

Schemas

SimpleXML

Parsing XML from a String

Parsing XML from a File

Namespaces

RSS

Generating XML with SimpleXML

DOMDocument

XMLReader and XMLWriter

Summary

images Chapter 15: JSON and Ajax

JSON

PHP and JSON

Ajax

The Traditional Web Model

Ajax Web Model

Asynchronous Versus Synchronous Events

XMLHttpRequest Object

Using XMLHttpRequest

High Level JavaScript APIs

jQuery Examples

Sending Data to a PHP Script via Ajax

A Simple Graphic Program

Maintaining State

Summary

images Chapter 16: Conclusion

Resources

www.php.net

www.zend.com

devzone.zend.com

PHP| Architect Magazine: www.phparch.com

Conferences

PHP Certification

Summary

images Appendix: Regular Expressions

Regular Expression Syntax

Regular Expression Examples

Internal Options

Greediness

PHP Regular Expression Functions

Replacing Strings: preg_replace

Other Regular Expression Functions

images Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset