Foreword.
Preface.
1. What Is New in PHP 5?
Introduction.
Language Features.
New Object-Oriented Model.
New Object-Oriented Features.
Other New Language Features.
General PHP Changes.
XML and Web Services.
Other New Features in PHP 5.
New Memory Manager.
Dropped Support for Windows 95.
Summary.
2. PHP 5 Basic Language.
Introduction.
HTML Embedding.
Comments.
Variables.
Indirect References to Variables.
Managing Variables.
Superglobals.
Basic Data Types.
Integers.
Floating-Point Numbers.
Strings.
Booleans.
Null.
Arrays.
Constants.
Operators.
Binary Operators.
Assignment Operators.
Comparison Operators.
Logical Operators.
Bitwise Operators.
Unary Operators.
Negation Operators.
Increment/Decrement Operators.
The Cast Operators.
The Silence Operator.
The One and Only Ternary Operator.
Control Structures.
Conditional Control Structures.
Loop Control Structures.
Code Inclusion Control Structures.
Functions.
User-Defined Functions.
Function Scope.
Returning Values By Value.
Returning Values By Reference.
Declaring Function Parameters.
Static Variables.
Summary.
3. PHP 5 OO Language.
Introduction.
Objects.
Declaring a Class.
The new Keyword and Constructors.
Destructors.
Accessing Methods and Properties Using the $this Variable.
public, protected, and private Properties.
public, protected, and private Methods.
Static Properties.
Static Methods.
Class Constants.
Cloning Objects.
Polymorphism.
parent:: and self::.
instanceof Operator.
Interfaces.
Inheritance of Interfaces.
final Methods.
final Classes.
__toString() Method.
Exception Handling.
__autoload().
Class Type Hints in Function Parameters.
Summary.
4. PHP 5 Advanced OOP and Design Patterns.
Introduction.
Overloading Capabilities.
Property and Method Overloading.
Overloading the Array Access Syntax.
Iterators.
Design Patterns.
Strategy Pattern.
Singleton Pattern.
Factory Pattern.
Observer Pattern.
if (window.amznJQ) { amznJQ.onCompletion('amznJQ.criticalFeature', function() { var precacheDetailImages = function(imageUrls, pids) { function transformUrl(imgUrl, pid) { var suffix = '._SL500_AA300_.jpg', defaultApparel = '._AA300_.jpg', imgUrlSplit = imgUrl.split("._"); if (imgUrlSplit.length) { var prefix = imgUrlSplit[0]; if ((!pid && storeName == "books") || pid == "books_display_on_website") { if (imgUrl.match("PIsitb-sticker-arrow")){ var OUID = imgUrl.substr(imgUrl.indexOf('_OU'), 6); var lookInsideSticker = '._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20'+ OUID +'.jpg'; urls.push(prefix + lookInsideSticker); } else { urls.push(prefix + suffix); } } else if ((!pid && storeName == "apparel") || pid == "apparel_display_on_website") { urls.push(prefix + "._SX342_.jpg"); urls.push(prefix + "._SY445_.jpg"); } else if ((!pid && storeName == "shoes") || pid == "shoes_display_on_website") { urls.push(prefix + "._SX395_.jpg"); urls.push(prefix + "._SY395_.jpg"); } else { urls.push(prefix + suffix); } } }; var urls = [], numImgsPreload = Math.min(6, imageUrls.length), storeName = "english-books"; for (var i = 0; i < numImgsPreload; i++){ var currPid = (pids && pids.length) ? pids[i] : ""; transformUrl(imageUrls[i], currPid); } for (var j = 0; j < urls.length; j++) { var img = new Image(); img.src = urls[j]; } }; var win = jQuery(window); var feature = jQuery("#purchaseShvl"); var shvlPresent = feature.length > 0 ? 1:0; var lastCheck = 0; var pending = 0; var onScrollPrecache = function() { if (pending) { return; } var lastCheckDiff = new Date().getTime() - lastCheck; var checkDelay = (lastCheckDiff < 200 ? 200 - lastCheckDiff : 10); pending = 1; var u = function() { if(shvlPresent && (win.scrollTop() + win.height() > feature.offset().top + 200)) { var p = precacheDetailImages, $ = jQuery; if (p) { var selector = "#purchaseButtonWrapper"; var imgElems = $(selector).find("a > div > img"); var pgs, imgs = [], i = imgElems.length; while (i-- > 0) { imgs[i] = $(imgElems[i]).attr('src'); } p(imgs,pgs); } // unbind listening on scroll once pre-caching completed $(window).unbind('scroll', onScrollPrecache); return; } pending = 0; //precache not execute yet, wait next invoke lastCheck = new Date().getTime(); }; setTimeout(u, checkDelay); return; }; jQuery(window).bind('scroll', onScrollPrecache); }); }
|