Place it in
app/config/configs.php or core/config/configs.php:
$configs['use_layout']=false;
$configs['unit_test_enabled']=true;
$configs['default_controller']="welcome";
$configs['global_profile']=true;
/* DB */
$configs['db']['usedb']="mysql";
$configs['db']['development']['dbname']="packtblog";
$configs['db']['development']['dbhost']="localhost";
$configs['db']['development']['dbuser']="root";
$configs['db']['development']['dbpwd']="root1234";
$configs['db']['development']['persistent']=true;
$configs['db']['development']['dbtype']="mysql";
?>
Chapter 9
[ 249 ]
Summary
In the rapid development of PHP applications, frameworks play a very important
role. That is why today there are so many enterprise-level frameworks in the market
and you have so many choices. We have learnt how to build a framework in this
chapter which will also help to understand object loading, data abstraction layers,
and the importance of separation. Finally, we took a closer look at how applications
are done.
Index
A
abstract class 30, 31
Abstract Factory
about 69
example 70, 71
ActiveRecord, design pattern
about 188
data, selecting 189
data, updating 189
new record, creating 189
ActiveRecord pattern 88
Adapter pattern
about 71
example 73-75
ADOdb
about 178
database, connecting to 179-183
database operations 183
installing 178
prepared statements, executing 184
records, deleting 184
records, inserting 184
records, updating 184
AppendIterator
about 150
example 151, 152
ArrayAccess
about 53
methods 53
ArrayIterator
about 143
example 143, 145
ArrayObject
about 51, 138
example 140, 142
functions 139
public members 138, 139
Array to Object
about 52
extending 52
B
Binary Large Objects 170
BLOB 170
C
class, extending
about 12
extending, preventing from 26
overriding, preventing from 26
class information functions
about 41
class existence, checking 41
class name, finding 43, 44
currently loaded classes, finding 42
methods existence, checking 42
properties existence, checking 42
type of class, checking 42
constructor 20-22
coupling 13
D
Data Abstraction Layers 178
Decorator pattern
about 84
example 84, 86
design patterns
about 13, 63
Abstract Factory 69
[ 252 ]
Active Record pattern 88
Adapter pattern 71
Decorator pattern 84
Facade pattern 88
Factory pattern 66
Iterator pattern 77
Observer pattern 80
Singleton pattern 75
Strategy pattern 64
destructor 20-22
DirectoryIterator
about 145
example 145-148
methods 149
DOM API, SimpleXML API
about 200
existing documents, modifying 202
functions 202
XML documents, creating 200, 202
E
encapsulation 12
exception handling
about 44-48
PHP errors collecting, as exception 48, 49
Extensible Markup Language.
Pages:
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242