PHP Objects, Patterns and Practice (3rd edition)

(Barry) #1
■ INDEX

MDB2_Driver_Common class, 138


MegaCal format, 153
MemApplicationRegistry class, code listing, 233
member variable, 17
Memcached, 291
Mercurial, 362
merge command, 377
method_exists(), 84
method(), 390
methodData(), 92
methods


abstract methods, 102
accessing methods and properties in the
context of a class, 41
accessor methods, 37
array hinting, 27
__call(), 60, 86
call_user_func(), 86
call_user_func_array(), 86–87
calling a method from within a namespace,
73
class type hints, 26
__construct(), 21
constructor method, 21
declaring a class or method final, 57
declaring class elements as public, private,
or protected, 35
definition of, 19
delegation, definition of, 60
__destruct(), code example, 62
destructor methods, 62
documenting in phpDocumentor, 355
documenting the value that a method
returns, 355
enforcing object types in method
declarations, 22
enforcing return types, 107
function keyword, 19
__get(), 58
get_class_methods(), 84
interceptor methods, table of, 58
invoking, 20
is_callable(), 84
__isset(), 59
magic methods, 62
method_exists(), 84
null default values in hinted arguments, 27

object types, 25
operations, in UML, 112
primitive types and test functions, table of,
22
primitive types, definition of, 22
__set(), 59
setting to private or protected, 36
static factory method, 49
static methods, 42, 102
storing a method name in a string variable,
84
testing that a method exists, 84
$this pseudo-variable, 20
__unset(), 60
using a string to invoke a method
dynamically, 86
using local methods for persistence, 105
visibility keywords, using in a method
declaration, 19
Metrics screen, 445
Metsker, Steven, 467
min element, 339
minilanguages, 189–190
Minion class, 146
mock objects, 224, 389
ModPerl Apache module, 229
Module interface, code listing, 94
ModuleRunner class, 95
movementRange(), 171
Mozilla project, 460
MyConfig class, code example, 330
mysql_connect(), 138
mysql_query(), 138

■ N
name element, 335
namespaces, 7, 455
accessing a class residing in a global (non-
namespaced) space, 75
aliasing namespaces, 74
calling a method from within a namespace,
73
combining multiple namespaces in the
same file, 76
declaring, 73, 75
definition of, 73
making an alias explicit, 74
Free download pdf