PHP Objects, Patterns and Practice (3rd edition)

(Barry) #1

■ INDEX


maintaining a global key table, 290
managing information about objects, 289
Memcached, 291
ObjectWatcher class, 290
SpaceMapper class, 291
tagging objects for identification, 290
targetClass(), 291
identity object
addTest(), 304
encapsulating query criteria, 301
Field class, code listing, 304
IdentityObject class, code listing, 302, 304
implementing, 302
managing query criteria with identity
objects, illustration of, 302
shielding users from database details, 307
using a fluent interface, 304
using SpaceIdentityObject to build a
WHERE clause, 303
if attribute, 412–413
illustrative code, 101


impedance mismatch, 276
implements clause, 48
implements keyword, 47–48
import command, 365
include(), 76, 258
include paths
fopen(), 79
get_include_path(), 79
include_path, setting in php.ini or
httpd.conf, 79
relative versus absolute paths, 78
require(), 79
set_include_path(), 79
include_once(), 76


includes attribute, 417
inheritance
accessing properties, 33
composition and, 132
constructors and, 33
declaring class elements as public, private,
or protected, 35
definition of, 27
deriving classes from a base class, 27
extends keyword, 32
favoring composition over inheritance, 169
get_parent_class(), 85


inheritance tree, building, 31
instanceof operator, 31
invoking the parent class’s constructor, 32
Lesson class simplified, code listing, 135
Lesson class, class diagram, 132
Lesson class, code listing, 133
misuse of, 142
overridden method, invoking, 35
parent and child classes, 27
parent keyword, 33, 35
poor inheritance structure, example of, 132
solving the inheritance problem, 27
superclass, 27
supporting runtime class switching
(polymorphism), 457
ini_set(), 337
init(), 95, 97, 237
input element
description of, 423
table of attributes, 424
insert(), 277–278
install command, 326
install element, 341
installconditions element, 341
installing applications
automating using installers, 320
PEAR installer, using, 320
Phing, 320
version control and, 320
instance(), 228
instanceof operator, 31, 83, 108
integration, definition of, 427
Intercepting Filter pattern, 184
interceptor methods
__call(), 60
__get(), 58
__isset(), 59
__set(), 59
__unset(), 60
table of, 58
interfaces
Chargeable interface, 47
declaring, 47
explanation of, 47
implementing, 47
interface keyword, 47
multiple interfaces, implementing, 48
Free download pdf