PHP Objects, Patterns and Practice (3rd edition)

(Barry) #1
■ INDEX

insert(), 277–278
Iterator interface, code listing, 281
Iterator interface, table of methods, 280
managing mapper creation, 278
managing multiple rows with collections,
283
Mapper base class, code listing, 277
Mapper classes, illustration of, 276
Nock, Clifton, 311
notifyAccess(), 282
object-relational impedance mismatch, 276
persistence classes, illustration of, 312
print_r(), 279
Registry class, 278
selectAllStmt(), 286
selectStmt(), 279, 286
setSpaces(), 285, 287
targetClass(), 283
update(), 279
using HelperFactory to acquire both
collections and mappers, 284
Venue class, code listing, 284
VenueCollection class, 282
VenueCollection interface, code listing, 283
VenueMapper class, code listing, 278
Data Source Name (DSN), 138
data types
checking the type of a variable, 23
class type hints, 26
PHP as a loosely typed language, 22
primitive types and test functions, table of,
22
strategies for dealing with argument types,
25
type-related errors, preventing, 25
DBFace class, 404
DecorateProcess class, 183
Decorator pattern
class diagram, 182
inheritance tree, class diagram, 180
overview of, 179
summary of, 185
using composition and delegation, 181
decoupling
creating independent components, 137
definition of, 454


hiding implementation behind a clean
interface, 138
overview of, 137
reusability versus tight coupling, 137
See also coupling
DefaultCommand class, code listing, 243
defaultValue attribute, 424
defensiveStrength(), 171
DeferredEventCollection class, code listing, 297
delegating object instantiation, 147
delegation, definition of, 60
delete element, 425
dependencies tag, 339
depends attribute, 447
description element, 335
design patterns
Abstract Factory pattern, 124, 457
Alexander, Christopher, 124, 126
benefits of, 123, 127, 456
collaborative nature of, 128
defining a vocabulary, 127
defining common problems, 127
defining the conditions in which solutions
should be applied, 125
definition of, 6, 123, 455
developing a vocabulary for describing
problems and solutions, 456
early concept of, 4
favoring composition over inheritance, 169
Fowler, Martin, 124–125, 143, 456
Gamma, Erich, 125
Gang of Four’s categorization of, 143
Gang of Four’s format for structuring
patterns, 126
half-baked nature of, 456
Helm, Richard, 125
implementing nuanced solutions, 126
inscribing approaches to particular
problems, 124
Johnson, Ralph, 125
language independence of, 127
naming, 125
overuse of, 456
overview of, 125
pattern languages, 125
patterns suggest complementary patterns,
456
Free download pdf