PHP Objects, Patterns and Practice (3rd edition)

(Barry) #1
■ INDEX

encapsulating the concept that varies, 142
hiding implementation behind a clean
interface, 138
endtoken attribute, 420
ensure(), 239
enterprise patterns


Application Controller pattern, 222
architecture overview, 221
business logic layer, 223
command and control layer, 223
data layer, 223
Domain Model pattern, 222
Fowler, Martin, 224
Front Controller pattern, 222
horizontal changes in a nontiered system,
224
keeping business logic independent of the
view layer, 223
layers or tiers in a typical enterprise system,
illustration of, 222
mock objects, 224
Page Controller pattern, 222
presentation layer, 223
Registry pattern, 222, 225
Singleton pattern, 225
singletons, usefulness of, 225
stubs, 224
switching between storage models, 223
Template View pattern, 222
testing systems created with separate tiers,
224
Transaction Script pattern, 222
vertical changes in a tiered system, 224
view layer, 222
Woo system, 224

env prefix, 415
EqualsExpression class, 195
error.php, 258
errors
amending __construct() to use the throw
statement, 53
catch clause, 54, 56
Conf(), 55
ConfException class, 55
ending program execution, 52
Exception class, subclassing, 54
Exception class, table of public methods, 53


exception, definition of, 53
fatal errors, 56
FileException class, 55
getTrace(), 53
getTraceAsString(), 53
handling, 51–52
libxml_get_last_error(), 55
LibXmlError class, 55
no support for return class type hinting in
PHP, 52
PEAR_Error class, 52
returning an error flag, 52
throwing an exception, 53
try clause, 54
XmlException class, 55
See also PHPUnit; testing
evaluate(), 484–485
exclude element, 339
excludes attribute, 417
exec element, 443, 448, 450
execute(), 95, 216, 243, 255, 268, 298
exists(), 290
exit(), 258
expects(), 389–390
export command, 374
Expression class, 191
expression(), 484
Extended Backus-Naur Form (EBNF)
Interpreter classes, class diagram, 191
productions and terminals, 191
extends clause, 48
extends keyword, 32
eXtreme Programming (XP)
Beck, Kent, 5
principles of, 5
ezcGraph, installing, 438

■ F
Facade pattern, 264
getting log information from a file, object-
oriented code example, 186
getting log information from a file,
procedural code example, 185
organizing system parts into separate tiers,
185
overview of, 185
summary of, 187
Free download pdf