SlideShare a Scribd company logo
Zend Framework 2 Documentation
Release 2.2.5

Zend Technologies Ltd.

October 31, 2013
Contents

1

Overview

1

2

Installation

3

3

Getting Started with Zend Framework 2
3.1 Some assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.2 The tutorial application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5
5
5

4

Getting started: A skeleton application
4.1 Using the Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Error reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7
8
9

5

Modules
5.1 Setting up the Album module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.3 Informing the application about our new module . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11
11
13
13

6

Routing and controllers

15

7

Create the controller
7.1 Initialise the view scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17
18

8

Database and models
8.1 The database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.2 The model files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.3 Using ServiceManager to configure the table gateway and inject into the AlbumTable .
8.4 Back to the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8.5 Listing albums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19
19
19
21
23
23

9

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

Styling and Translations

10 Forms and actions
10.1 Adding new albums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2 Editing an album . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.3 Deleting an album . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27
29
29
34
36
i
10.4 Ensuring that the home page displays the list of albums . . . . . . . . . . . . . . . . . . . . . . . . .
11 Conclusion

38
39

12 Zend Framework Tool (ZFTool)
12.1 Installation using Composer . . . . . . .
12.2 Manual installation . . . . . . . . . . . .
12.3 Without installation, using the PHAR file
12.4 Usage . . . . . . . . . . . . . . . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

41
41
41
41
42

13 Learning Dependency Injection
13.1 Very brief introduction to Di. . . . . . . . . . . . . . .
13.2 Simplest usage case (2 classes, one consumes the other)
13.3 Simplest Usage Case Without Type-hints . . . . . . . .
13.4 Simplest usage case with Compiled Definition . . . . .
13.5 Creating a precompiled definition for others to use . . .
13.6 Using Multiple Definitions From Multiple Sources . . .
13.7 Generating Service Locators . . . . . . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

45
45
45
47
48
50
50
51

14 Unit Testing a Zend Framework 2 application
14.1 Setting up the tests directory . . . . . . . . .
14.2 Bootstrapping your tests . . . . . . . . . . .
14.3 Your first controller test . . . . . . . . . . .
14.4 A failing test case . . . . . . . . . . . . . .
14.5 Configuring the service manager for the tests
14.6 Testing actions with POST . . . . . . . . . .
14.7 Testing model entities . . . . . . . . . . . .
14.8 Testing model tables . . . . . . . . . . . . .
14.9 Conclusion . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

55
55
56
58
59
60
61
62
64
68

15 Using the EventManager
15.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.2 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.3 Shared managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

69
69
69
71

16 Wildcards

73

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

17 Listener aggregates
17.1 Introspecting results . . . . . . . . . . . . . . . . . . . .
17.2 Short-ciruiting listener execution . . . . . . . . . . . . .
17.3 Keeping it in order . . . . . . . . . . . . . . . . . . . . .
17.4 Custom event objects . . . . . . . . . . . . . . . . . . . .
17.5 Putting it together: Implementing a simple caching system
17.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

75
76
76
77
78
79
81

18 Advanced Configuration Tricks
18.1 System configuration . . . . . . .
18.2 Module Configuration . . . . . .
18.3 Configuration mapping table . . .
18.4 Configuration Priority . . . . . .
18.5 Configuration merging workflow

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

83
83
87
88
88
88

19 Using ZendNavigation in your Album Module
19.1 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19.2 Setting Up ZendNavigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91
91
91

ii

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.
19.3 Configuring our Site Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19.4 Adding the Menu View Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19.5 Adding Breadcrumbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20 Using ZendPaginator in your Album Module
20.1 Preparation . . . . . . . . . . . . . . . .
20.2 Modifying the AlbumTable . . . . . . .
20.3 Modifying the AlbumController . . . . .
20.4 Updating the View Script . . . . . . . .
20.5 Creating the Pagination Control Partial .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

92
93
93

95
. 95
. 98
. 99
. 99
. 100

21 Using the PaginationControl View Helper

103

22 Setting up a database adapter
105
22.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
22.2 Basic setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
22.3 Setting a static adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
23 Migration from Zend Framework 1

107

24 Namespacing Old Classes
109
24.1 Namespacing a ZF1 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
24.2 HOWTO Namespace Your Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
25 Running Zend Framework 2 and Zend Framework 1 in parallel
25.1 Use ZF2 in a ZF1 project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25.2 Use ZF1 in a ZF2 project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25.3 Run ZF1 and ZF2 together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

113
113
114
114

26 Introduction to ZendAuthentication
26.1 Adapters . . . . . . . . . . . .
26.2 Results . . . . . . . . . . . . .
26.3 Identity Persistence . . . . . . .
26.4 Usage . . . . . . . . . . . . . .

117
117
118
119
122

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

27 Database Table Authentication
125
27.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
27.2 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
27.3 Advanced Usage: Persisting a DbTable Result Object . . . . . . . . . . . . . . . . . . . . . . . . . . 128
28 Digest Authentication
28.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28.2 Specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28.3 Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

131
131
131
131

29 HTTP Authentication Adapter
29.1 Introduction . . . . . . .
29.2 Design Overview . . . . .
29.3 Configuration Options . .
29.4 Resolvers . . . . . . . . .
29.5 Basic Usage . . . . . . .

.
.
.
.
.

133
133
133
134
134
135

30 LDAP Authentication
30.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30.2 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30.3 The API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137
137
137
139

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

iii
30.4 Server Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
30.5 Collecting Debugging Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
30.6 Common Options for Specific Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
31 Authentication Validator
145
31.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
31.2 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
32 Introduction to ZendBarcode

147

33 Barcode creation using ZendBarcodeBarcode class
149
33.1 Using ZendBarcodeBarcode::factory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
33.2 Drawing a barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
33.3 Rendering a barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
34 ZendBarcodeBarcode Objects
153
34.1 Common Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
34.2 Common Additional Getters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
34.3 Description of shipped barcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
35 ZendBarcode Renderers
163
35.1 Common Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
35.2 ZendBarcodeRendererImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
35.3 ZendBarcodeRendererPdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
36 ZendCacheStorageAdapter
36.1 Overview . . . . . . . . . . . . . . .
36.2 Quick Start . . . . . . . . . . . . . .
36.3 Basic Configuration Options . . . . .
36.4 The StorageInterface . . . . . . . . .
36.5 The AvailableSpaceCapableInterface
36.6 The TotalSpaceCapableInterface . . .
36.7 The ClearByNamespaceInterface . .
36.8 The ClearByPrefixInterface . . . . .
36.9 The ClearExpiredInterface . . . . . .
36.10 The FlushableInterface . . . . . . . .
36.11 The IterableInterface . . . . . . . . .
36.12 The OptimizableInterface . . . . . .
36.13 The TaggableInterface . . . . . . . .
36.14 The Apc Adapter . . . . . . . . . . .
36.15 The Dba Adapter . . . . . . . . . . .
36.16 The Filesystem Adapter . . . . . . .
36.17 The Memcached Adapter . . . . . .
36.18 The Memory Adapter . . . . . . . .
36.19 The WinCache Adapter . . . . . . .
36.20 The XCache Adapter . . . . . . . . .
36.21 The ZendServerDisk Adapter . . . .
36.22 The ZendServerShm Adapter . . . .
36.23 Examples . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

165
165
165
166
166
168
168
169
169
169
169
169
170
170
170
171
172
173
174
175
176
177
177
178

37 ZendCacheStorageCapabilities
37.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37.2 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

181
181
181
183

iv

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
38 ZendCacheStoragePlugin
38.1 Overview . . . . . . . . . . . . .
38.2 Quick Start . . . . . . . . . . . .
38.3 The ClearExpiredByFactor Plugin
38.4 The ExceptionHandler Plugin . .
38.5 The IgnoreUserAbort Plugin . . .
38.6 The OptimizeByFactor Plugin . .
38.7 The Serializer Plugin . . . . . . .
38.8 Available Methods . . . . . . . .
38.9 Examples . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

185
185
185
186
186
186
186
187
187
188

39 ZendCachePattern
189
39.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
39.2 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
39.3 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
40 ZendCachePatternCallbackCache
40.1 Overview . . . . . . . . . . . .
40.2 Quick Start . . . . . . . . . . .
40.3 Configuration Options . . . . .
40.4 Available Methods . . . . . . .
40.5 Examples . . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

191
191
191
191
192
192

41 ZendCachePatternClassCache
41.1 Overview . . . . . . . . . .
41.2 Quick Start . . . . . . . . .
41.3 Configuration Options . . .
41.4 Available Methods . . . . .
41.5 Examples . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

193
193
193
193
194
194

42 ZendCachePatternObjectCache
42.1 Overview . . . . . . . . . . .
42.2 Quick Start . . . . . . . . . .
42.3 Configuration Options . . . .
42.4 Available Methods . . . . . .
42.5 Examples . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

197
197
197
198
198
199

43 ZendCachePatternOutputCache
43.1 Overview . . . . . . . . . . .
43.2 Quick Start . . . . . . . . . .
43.3 Configuration Options . . . .
43.4 Available Methods . . . . . .
43.5 Examples . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

201
201
201
201
201
202

44 ZendCachePatternCaptureCache
44.1 Overview . . . . . . . . . . . .
44.2 Quick Start . . . . . . . . . . .
44.3 Configuration Options . . . . .
44.4 Available Methods . . . . . . .
44.5 Examples . . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

203
203
203
204
204
205

45 Introduction to ZendCaptcha

207

46 Captcha Operation

209

v
47 CAPTCHA Adapters
47.1 ZendCaptchaAbstractWord
47.2 ZendCaptchaDumb . . . .
47.3 ZendCaptchaFiglet . . . .
47.4 ZendCaptchaImage . . . .
47.5 ZendCaptchaReCaptcha .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

211
211
212
212
212
213

48 Introduction to ZendConfig
215
48.1 Using ZendConfigConfig with a Reader Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
48.2 Using ZendConfigConfig with a PHP Configuration File . . . . . . . . . . . . . . . . . . . . . . . 216
49 Theory of Operation
50 ZendConfigReader
50.1 ZendConfigReaderIni .
50.2 ZendConfigReaderXml
50.3 ZendConfigReaderJson
50.4 ZendConfigReaderYaml

217

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

219
219
220
222
223

51 ZendConfigWriter
51.1 ZendConfigWriterIni . . . .
51.2 ZendConfigWriterXml . . .
51.3 ZendConfigWriterPhpArray
51.4 ZendConfigWriterJson . . .
51.5 ZendConfigWriterYaml . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

225
225
226
227
228
228

52 ZendConfigProcessor
52.1 ZendConfigProcessorConstant .
52.2 ZendConfigProcessorFilter . .
52.3 ZendConfigProcessorQueue . .
52.4 ZendConfigProcessorToken . .
52.5 ZendConfigProcessorTranslator

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

231
231
232
232
233
233

.
.
.
.

53 The Factory
235
53.1 Loading configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
53.2 Storing configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
54 Introduction to ZendConsole
237
54.1 Writing console routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
54.2 Handling console requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
54.3 Adding console usage info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
55 Console routes and routing
55.1 Router configuration . . .
55.2 Basic route . . . . . . . .
55.3 Catchall route . . . . . . .
55.4 Console routes cheat-sheet

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

243
243
244
248
249

56 Console-aware modules
251
56.1 Application banner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
56.2 Usage information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
56.3 Best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
57 Console-aware action controllers
261
57.1 Handling console requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
57.2 Sending output to console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
vi
57.3 Are we in a console? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
57.4 Reading values from console parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
58 Console adapters
269
58.1 Retrieving console adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
58.2 Using console adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
59 Console prompts
59.1 Confirm . .
59.2 Line . . . .
59.3 Char . . .
59.4 Select . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

273
274
274
275
276

60 Introduction to ZendCrypt

279

61 Encrypt/decrypt using block ciphers

281

62 Key derivation function
283
62.1 Pbkdf2 adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
62.2 SaltedS2k adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
62.3 Scrypt adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
63 Password
287
63.1 Bcrypt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
63.2 Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
64 Public key cryptography
291
64.1 Diffie-Hellman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
64.2 RSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
65 ZendDbAdapter
65.1 Creating an Adapter - Quickstart . . . . . . . . . . . . . . . . .
65.2 Creating an Adapter Using Dependency Injection . . . . . . . .
65.3 Query Preparation Through ZendDbAdapterAdapter::query()
65.4 Query Execution Through ZendDbAdapterAdapter::query() .
65.5 Creating Statements . . . . . . . . . . . . . . . . . . . . . . .
65.6 Using the Driver Object . . . . . . . . . . . . . . . . . . . . .
65.7 Using The Platform Object . . . . . . . . . . . . . . . . . . . .
65.8 Using The Parameter Container . . . . . . . . . . . . . . . . .
65.9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.

297
297
298
298
299
299
299
301
302
303

66 ZendDbResultSet
66.1 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
66.2 ZendDbResultSetResultSet and ZendDbResultSetAbstractResultSet . . . . . . . . . . . . . . . .
66.3 ZendDbResultSetHydratingResultSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

305
305
306
306

67 ZendDbSql
67.1 ZendDbSqlSql (Quickstart) . . . . . . . . . .
67.2 ZendDbSql’s Select, Insert, Update and Delete
67.3 ZendDbSqlSelect . . . . . . . . . . . . . . . .
67.4 ZendDbSqlInsert . . . . . . . . . . . . . . . .
67.5 ZendDbSqlUpdate . . . . . . . . . . . . . . .
67.6 ZendDbSqlDelete . . . . . . . . . . . . . . .
67.7 ZendDbSqlWhere & ZendDbSqlHaving . .

309
309
310
310
313
314
314
314

68 ZendDbSqlDdl

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

321
vii
69 Creating Tables

323

70 Altering Tables

325

71 Dropping Tables

327

72 Executing DDL Statements

329

73 Currently Supported Data Types

331

74 Currently Supported Constraint Types

333

75 ZendDbTableGateway
335
75.1 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
75.2 TableGateway Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
76 ZendDbRowGateway
339
76.1 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
76.2 ActiveRecord Style Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
77 ZendDbMetadata
341
77.1 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
78 Introduction to ZendDi
345
78.1 Dependency Injection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
78.2 Dependency Injection Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
79 ZendDi Quickstart
80 ZendDi Definition
80.1 DefinitionList . . .
80.2 RuntimeDefinition
80.3 CompilerDefinition
80.4 ClassDefinition . .

347

.
.
.
.

351
351
351
352
353

81 ZendDi InstanceManager
81.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
81.2 Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
81.3 Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

355
355
356
357

82 ZendDi Configuration

359

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

83 ZendDi Debugging & Complex Use Cases
361
83.1 Debugging a DiC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
83.2 Complex Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
84 Introduction to ZendDom

365

85 ZendDomQuery
367
85.1 Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
85.2 Methods Available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
86 Introduction to ZendEscaper
371
86.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
86.2 What ZendEscaper is not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

viii
87 Theory of Operation
373
87.1 The Problem with Inconsistent Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
87.2 Why Contextual Escaping? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
88 Configuring ZendEscaper

377

89 Escaping HTML
379
89.1 Examples of Bad HTML Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
89.2 Examples of Good HTML Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
90 Escaping HTML Attributes
381
90.1 Examples of Bad HTML Attribute Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
90.2 Examples of Good HTML Attribute Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
91 Escaping Javascript
385
91.1 Examples of Bad Javascript Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
91.2 Examples of Good Javascript Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
92 Escaping Cascading Style Sheets
387
92.1 Examples of Bad CSS Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
92.2 Examples of Good CSS Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
93 Escaping URLs
389
93.1 Examples of Bad URL Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
93.2 Examples of Good URL Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
94 The EventManager
94.1 Overview . . . . . . .
94.2 Quick Start . . . . . .
94.3 Configuration Options
94.4 Available Methods . .
94.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

391
391
391
394
395
396

95 Introduction to ZendFeed
401
95.1 Reading RSS Feed Data with ZendFeedReader . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
96 Importing Feeds
403
96.1 Dumping the contents of a feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
97 Retrieving Feeds from Web Pages
405
97.1 Find Feed Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
98 Consuming an RSS Feed
407
98.1 Reading a feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
98.2 Get properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
99 Consuming an Atom Feed
409
99.1 Basic Use of an Atom Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
100Consuming a Single Atom Entry
411
100.1 Reading a Single-Entry Atom Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
101ZendFeed and Security
413
101.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
101.2 Filtering data using HTMLPurifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
101.3 Escaping data using ZendEscaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

ix
102ZendFeedReaderReader
102.1 Introduction . . . . . . . . . . . . . . . . . .
102.2 Importing Feeds . . . . . . . . . . . . . . . .
102.3 Retrieving Underlying Feed and Entry Sources
102.4 Cache Support and Intelligent Requests . . . .
102.5 Locating Feed URIs from Websites . . . . . .
102.6 Attribute Collections . . . . . . . . . . . . . .
102.7 Retrieving Feed Information . . . . . . . . . .
102.8 Retrieving Entry/Item Information . . . . . . .
102.9 Extending Feed and Entry APIs . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

417
417
417
418
419
420
421
421
424
426

103ZendFeedWriterWriter
103.1 Introduction . . . . . . .
103.2 Architecture . . . . . . .
103.3 Getting Started . . . . . .
103.4 Setting Feed Data Points .
103.5 Setting Entry Data Points

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

431
431
431
432
434
436

104ZendFeedPubSubHubbub
104.1 What is PubSubHubbub? . . . . . . . .
104.2 Architecture . . . . . . . . . . . . . .
104.3 ZendFeedPubSubHubbubPublisher .
104.4 ZendFeedPubSubHubbubSubscriber

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

439
439
439
440
441

105ZendFileClassFileLocator
105.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
105.2 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
105.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

447
447
447
447

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

106Introduction to ZendFilter
449
106.1 What is a filter? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
106.2 Basic usage of filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
107Using the StaticFilter
451
107.1 Double filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
108Standard Filter Classes
108.1 Alnum . . . . . . . . . . .
108.2 Alpha . . . . . . . . . . . .
108.3 BaseName . . . . . . . . .
108.4 Boolean . . . . . . . . . . .
108.5 Callback . . . . . . . . . .
108.6 Compress and Decompress .
108.7 Digits . . . . . . . . . . . .
108.8 Dir . . . . . . . . . . . . .
108.9 Encrypt and Decrypt . . . .
108.10HtmlEntities . . . . . . . .
108.11Int . . . . . . . . . . . . . .
108.12Null . . . . . . . . . . . . .
108.13NumberFormat . . . . . . .
108.14PregReplace . . . . . . . .
108.15RealPath . . . . . . . . . .
108.16StringToLower . . . . . . .
108.17StringToUpper . . . . . . .
108.18StringTrim . . . . . . . . .

x

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

453
453
454
454
455
458
459
464
465
465
471
473
473
474
475
476
477
478
478
108.19StripNewLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
108.20StripTags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
108.21UriNormalize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
109Word Filters
109.1 CamelCaseToDash . . . .
109.2 CamelCaseToSeparator .
109.3 CamelCaseToUnderscore
109.4 DashToCamelCase . . . .
109.5 DashToSeparator . . . . .
109.6 DashToUnderscore . . . .
109.7 SeparatorToCamelCase .
109.8 SeparatorToDash . . . . .
109.9 SeparatorToSeparator . .
109.10UnderscoreToCamelCase
109.11UnderscoreToSeparator .
109.12UnderscoreToDash . . . .

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

483
483
483
484
484
485
485
486
486
487
488
488
489

110File Filter Classes
110.1 Decrypt . . . .
110.2 Encrypt . . . .
110.3 Lowercase . .
110.4 Rename . . . .
110.5 RenameUpload
110.6 Uppercase . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

491
491
491
491
491
493
494

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

111Filter Chains
495
111.1 Setting Filter Chain Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
111.2 Using the Plugin Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
112ZendFilterInflector
112.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . .
112.2 Using Custom Filters . . . . . . . . . . . . . . . . . . . .
112.3 Setting the Inflector Target . . . . . . . . . . . . . . . . .
112.4 Inflection Rules . . . . . . . . . . . . . . . . . . . . . . .
112.5 Utility Methods . . . . . . . . . . . . . . . . . . . . . . .
112.6 Using a Traversable or an array with ZendFilterInflector

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

497
497
498
498
499
501
501

113Writing Filters

503

114Introduction to ZendForm

505

115Form Quick Start
115.1 Programmatic Form Creation .
115.2 Creation via Factory . . . . . .
115.3 Factory-backed Form Extension
115.4 Validating Forms . . . . . . . .
115.5 Hinting to the Input Filter . . .
115.6 Binding an object . . . . . . . .
115.7 Rendering . . . . . . . . . . .
115.8 Validation Groups . . . . . . .
115.9 Using Annotations . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

507
507
508
512
513
514
516
517
520
521

116Form Collections
525
116.1 Creating Fieldsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528

xi
116.2
116.3
116.4
116.5
116.6

The Form Element . . . . . . . . . . . . . .
The Controller . . . . . . . . . . . . . . . .
The View . . . . . . . . . . . . . . . . . . .
Adding New Elements Dynamically . . . . .
Validation groups for fieldsets and collection

117File Uploading
117.1 Standard Example . . . . . .
117.2 File Post-Redirect-Get Plugin
117.3 HTML5 Multi-File Uploads .
117.4 Upload Progress . . . . . . .
117.5 Additional Info . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

532
533
534
535
537

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

541
541
544
546
547
551

118Advanced use of forms
118.1 Short names . . . . . . . . . .
118.2 Creating custom elements . . .
118.3 Handling dependencies . . . . .
118.4 The specific case of initializers .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

553
553
553
557
559

119Form Elements
119.1 Introduction . . . .
119.2 Element Base Class
119.3 Standard Elements .
119.4 HTML5 Elements .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

561
561
561
563
578

120Form View Helpers
120.1 Introduction . . . . . . . . .
120.2 Standard Helpers . . . . . . .
120.3 HTML5 Helpers . . . . . . .
120.4 File Upload Progress Helpers

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

593
593
593
605
609

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

121Overview of ZendHttp
611
121.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
121.2 ZendHttp Request, Response and Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
122The Request Class
122.1 Overview . . . . . . .
122.2 Quick Start . . . . . .
122.3 Configuration Options
122.4 Available Methods . .
122.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

613
613
613
614
614
617

123The Response Class
123.1 Overview . . . . . . .
123.2 Quick Start . . . . . .
123.3 Configuration Options
123.4 Available Methods . .
123.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

619
619
619
620
620
623

124The Headers Class
124.1 Overview . . . . . . . . . . . . . .
124.2 Quick Start . . . . . . . . . . . . .
124.3 Configuration Options . . . . . . .
124.4 Available Methods . . . . . . . . .
124.5 ZendHttpHeader* Base Methods

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

625
625
625
626
626
628

xii
124.6 List of HTTP Header Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
124.7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
125HTTP Client - Overview
125.1 Overview . . . . . . .
125.2 Quick Start . . . . . .
125.3 Configuration Options
125.4 Available Methods . .
125.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

633
633
633
634
634
638

126HTTP Client - Connection Adapters
126.1 Overview . . . . . . . . . . . . . . . .
126.2 The Socket Adapter . . . . . . . . . .
126.3 The Proxy Adapter . . . . . . . . . . .
126.4 The cURL Adapter . . . . . . . . . . .
126.5 The Test Adapter . . . . . . . . . . . .
126.6 Creating your own connection adapters

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

641
641
641
644
645
646
648

127HTTP Client - Advanced Usage
127.1 HTTP Redirections . . . . . . . . . . . . . . . .
127.2 Adding Cookies and Using Cookie Persistence .
127.3 Setting Custom Request Headers . . . . . . . .
127.4 File Uploads . . . . . . . . . . . . . . . . . . .
127.5 Sending Raw POST Data . . . . . . . . . . . .
127.6 HTTP Authentication . . . . . . . . . . . . . .
127.7 Sending Multiple Requests With the Same Client
127.8 Data Streaming . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

651
651
651
653
654
654
655
655
656

128HTTP Client - Static Usage
128.1 Overview . . . . . . .
128.2 Quick Start . . . . . .
128.3 Configuration Options
128.4 Available Methods . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

659
659
659
659
660

129Translating
129.1 Adding translations .
129.2 Supported formats .
129.3 Setting a locale . . .
129.4 Translating messages
129.5 Caching . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

661
661
662
662
662
662

130I18n View Helpers
130.1 Introduction . . . . . . .
130.2 CurrencyFormat Helper .
130.3 DateFormat Helper . . . .
130.4 NumberFormat Helper . .
130.5 Plural Helper . . . . . . .
130.6 Translate Helper . . . . .
130.7 TranslatePlural Helper . .
130.8 Abstract Translator Helper

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

663
663
663
665
666
667
668
669
670

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

131I18n Filters
671
131.1 Alnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
131.2 Alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
131.3 NumberFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672

xiii
131.4 NumberParse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
132I18n Validators

675

133Float
677
133.1 Supported options for ZendI18nValidatorFloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
133.2 Simple float validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
133.3 Localized float validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
134Int
679
134.1 Supported options for ZendI18nValidatorInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
134.2 Simple integer validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
134.3 Localized integer validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
135Introduction to ZendInputFilter

681

136File Upload Input

685

137Introduction to ZendJson

687

138Basic Usage
689
138.1 Pretty-printing JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
139Advanced Usage of ZendJson
139.1 JSON Objects . . . . . .
139.2 Encoding PHP objects . .
139.3 Internal Encoder/Decoder
139.4 JSON Expressions . . . .

.
.
.
.

140XML to JSON conversion

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

691
691
691
692
692
693

141ZendJsonServer - JSON-RPC server
695
141.1 Advanced Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
142Introduction to ZendLdap
703
142.1 Theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
143API overview
707
143.1 Configuration / options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
143.2 API Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
144ZendLdapLdap
709
144.1 ZendLdapCollection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
145ZendLdapAttribute

711

146ZendLdapConverterConverter

713

147ZendLdapDn

715

148ZendLdapFilter

717

149ZendLdapNode

719

150ZendLdapNodeRootDse
721
150.1 OpenLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
150.2 ActiveDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723

xiv
150.3 eDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
151ZendLdapNodeSchema
727
151.1 OpenLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
151.2 ActiveDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
152ZendLdapLdifEncoder

731

153Usage Scenarios
733
153.1 Authentication scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
153.2 Basic CRUD operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
153.3 Extended operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
154Tools
154.1 Creation and modification of DN strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
154.2 Using the filter API to create search filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
154.3 Modify LDAP entries using the Attribute API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

737
737
737
737

155Object-oriented access to the LDAP tree using ZendLdapNode
155.1 Basic CRUD operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
155.2 Extended operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
155.3 Tree traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

739
739
739
739

156Getting information from the LDAP server
741
156.1 RootDSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
156.2 Schema Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741
157Serializing LDAP data to and from LDIF
743
157.1 Serialize a LDAP entry to LDIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
157.2 Deserialize a LDIF string into a LDAP entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744
158The AutoloaderFactory
158.1 Overview . . . . . . .
158.2 Quick Start . . . . . .
158.3 Configuration Options
158.4 Available Methods . .
158.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

747
747
747
748
748
748

159The StandardAutoloader
159.1 Overview . . . . . . .
159.2 Quick Start . . . . . .
159.3 Configuration Options
159.4 Available Methods . .
159.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

749
749
750
751
751
752

160The ClassMapAutoloader
160.1 Overview . . . . . . .
160.2 Quick Start . . . . . .
160.3 Configuration Options
160.4 Available Methods . .
160.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

753
753
753
754
754
755

161The ModuleAutoloader
161.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
161.2 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
161.3 Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

757
757
757
757
xv
161.4 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
161.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
162The SplAutoloader Interface
162.1 Overview . . . . . . . .
162.2 Quick Start . . . . . . .
162.3 Configuration Options .
162.4 Available Methods . . .
162.5 Examples . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

759
759
759
760
760
761

163The PluginClassLoader
163.1 Overview . . . . . . .
163.2 Quick Start . . . . . .
163.3 Configuration Options
163.4 Available Methods . .
163.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

763
763
763
764
764
765

164The ShortNameLocator Interface
164.1 Overview . . . . . . . . . . .
164.2 Quick Start . . . . . . . . . .
164.3 Configuration Options . . . .
164.4 Available Methods . . . . . .
164.5 Examples . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

769
769
769
770
770
770

165The PluginClassLocator interface
165.1 Overview . . . . . . . . . . .
165.2 Quick Start . . . . . . . . . .
165.3 Configuration Options . . . .
165.4 Available Methods . . . . . .
165.5 Examples . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

771
771
771
771
771
772

.
.
.
.
.

166The Class Map Generator utility: bin/classmap_generator.php
773
166.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
166.2 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
166.3 Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773
167Overview of ZendLog
167.1 Creating a Log . . . . . .
167.2 Logging Messages . . . .
167.3 Destroying a Log . . . . .
167.4 Using Built-in Priorities .
167.5 Understanding Log Events
167.6 Log PHP Errors . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

775
775
776
776
776
777
777

168Writers
168.1 Writing to Streams . . .
168.2 Writing to Databases . .
168.3 Writing to FirePHP . . .
168.4 Stubbing Out the Writer
168.5 Testing with the Mock .
168.6 Compositing Writers . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

779
779
780
781
781
781
782

.
.
.
.
.
.

169Filters
783
169.1 Available filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783

xvi
170Formatters
170.1 Simple Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
170.2 Formatting to XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
170.3 Formatting to FirePhp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

785
785
786
786

171Introduction to ZendMail
787
171.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
171.2 Configuring the default sendmail transport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788
172ZendMailMessage
172.1 Overview . . . . . . .
172.2 Quick Start . . . . . .
172.3 Configuration Options
172.4 Available Methods . .
172.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

789
789
789
791
791
794

173ZendMailTransport
173.1 Overview . . . . . . .
173.2 Quick Start . . . . . .
173.3 Configuration Options
173.4 Available Methods . .
173.5 Examples . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

795
795
795
796
797
797

174ZendMailTransportSmtpOptions
174.1 Overview . . . . . . . . . . . .
174.2 Quick Start . . . . . . . . . . .
174.3 Configuration Options . . . . .
174.4 Available Methods . . . . . . .
174.5 Examples . . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

799
799
799
801
801
802

175ZendMailTransportFileOptions
175.1 Overview . . . . . . . . . . .
175.2 Quick Start . . . . . . . . . .
175.3 Configuration Options . . . .
175.4 Available Methods . . . . . .
175.5 Examples . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

803
803
803
803
804
804

.
.
.
.
.

176Introduction to ZendMath
805
176.1 Random number generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
176.2 Big integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
177ZendMime
809
177.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
177.2 Static Methods and Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809
177.3 Instantiating ZendMime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810
178ZendMimeMessage
178.1 Introduction . . . . . . . . . . . . . . . . . . . . . .
178.2 Instantiation . . . . . . . . . . . . . . . . . . . . . .
178.3 Adding MIME Parts . . . . . . . . . . . . . . . . . .
178.4 Boundary handling . . . . . . . . . . . . . . . . . . .
178.5 Parsing a string to create a ZendMimeMessage object
178.6 Available methods . . . . . . . . . . . . . . . . . . .
179ZendMimePart

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

811
811
811
811
811
812
812
813

xvii
179.1
179.2
179.3
179.4

Introduction . . . . . . . . . . . . . . . . . . . .
Instantiation . . . . . . . . . . . . . . . . . . . .
Methods for rendering the message part to a string
Available methods . . . . . . . . . . . . . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

813
813
813
814

180Introduction to the Module System
815
180.1 The autoload_*.php Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816
181The Module Manager
817
181.1 Module Manager Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
181.2 Module Manager Listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
182The Module Class
182.1 A Minimal Module . . . . . . .
182.2 A Typical Module Class . . . .
182.3 The “loadModules.post” Event
182.4 The MVC “bootstrap” Event . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

821
821
821
822
823

183The Module Autoloader
825
183.1 Module Autoloader Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
183.2 Non-Standard / Explicit Module Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826
183.3 Packaging Modules with Phar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
184Best Practices when Creating Modules

829

185Introduction to the MVC Layer
185.1 Basic Application Structure . . . . .
185.2 Basic Module Structure . . . . . . .
185.3 Bootstrapping an Application . . . .
185.4 Bootstrapping a Modular Application
185.5 Conclusion . . . . . . . . . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

831
832
832
834
836
837

186Quick Start
186.1 Install the Zend Skeleton Application .
186.2 Create a New Module . . . . . . . . .
186.3 Update the Module Class . . . . . . . .
186.4 Create a Controller . . . . . . . . . . .
186.5 Create a View Script . . . . . . . . . .
186.6 Create a Route . . . . . . . . . . . . .
186.7 Tell the Application About our Module
186.8 Test it Out! . . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

839
839
840
840
841
842
842
844
845

187Default Services
187.1 Theory of Operation . . . . . . . .
187.2 ServiceManager . . . . . . . . . .
187.3 Abstract Factories . . . . . . . . .
187.4 Plugin Managers . . . . . . . . . .
187.5 ViewManager . . . . . . . . . . . .
187.6 Application Configuration Options
187.7 Default Configuration Options . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

847
847
847
852
854
855
856
857

.
.
.
.
.
.
.

.
.
.
.
.
.
.

188Routing
861
188.1 Router Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
188.2 HTTP Route Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
188.3 HTTP Routing Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869

xviii
188.4 Console Route Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871
189The MvcEvent
189.1 Order of events . . . . . . . . . . . . . . .
189.2 MvcEvent::EVENT_BOOTSTRAP . . . .
189.3 MvcEvent::EVENT_ROUTE . . . . . . .
189.4 MvcEvent::EVENT_DISPATCH . . . . .
189.5 MvcEvent::EVENT_DISPATCH_ERROR
189.6 MvcEvent::EVENT_RENDER . . . . . .
189.7 MvcEvent::EVENT_RENDER_ERROR .
189.8 MvcEvent::EVENT_FINISH . . . . . . .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

873
874
874
875
876
877
879
879
880

190The SendResponseEvent
883
190.1 Listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
190.2 Triggerers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884
191Available Controllers
885
191.1 Common Interfaces Used With Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
191.2 The AbstractActionController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887
191.3 The AbstractRestfulController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
192Controller Plugins
192.1 AcceptableViewModelSelector Plugin
192.2 FlashMessenger Plugin . . . . . . . .
192.3 Forward Plugin . . . . . . . . . . . .
192.4 Identity Plugin . . . . . . . . . . . .
192.5 Layout Plugin . . . . . . . . . . . .
192.6 Params Plugin . . . . . . . . . . . .
192.7 Post/Redirect/Get Plugin . . . . . . .
192.8 File Post/Redirect/Get Plugin . . . .
192.9 Redirect Plugin . . . . . . . . . . . .
192.10Url Plugin . . . . . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.

891
891
892
894
894
895
895
896
896
898
898

193Examples
899
193.1 Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899
193.2 Bootstrapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900
194Introduction to ZendNavigation
903
194.1 Pages and Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903
194.2 View Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904
195Quick Start

905

196Pages

907

197Common page features

909

198ZendNavigationPageMvc

913

199ZendNavigationPageUri

917

200Creating custom page types

919

201Creating pages using the page factory

921

xix
202Containers
202.1 Creating containers
202.2 Adding pages . . .
202.3 Removing pages .
202.4 Finding pages . . .
202.5 Iterating containers
202.6 Other operations .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

923
923
929
930
931
933
934

203View Helpers
203.1 Introduction . . . . . . . . . . . .
203.2 Translation of labels and titles . . .
203.3 Integration with ACL . . . . . . . .
203.4 Navigation setup used in examples

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

937
937
938
939
939

204View Helper - Breadcrumbs
204.1 Introduction . . . . . . . . . . . . .
204.2 Basic usage . . . . . . . . . . . . . .
204.3 Specifying indentation . . . . . . . .
204.4 Customize output . . . . . . . . . . .
204.5 Rendering using a partial view script

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

945
945
945
946
946
947

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

205View Helper - Links
949
205.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949
205.2 Basic usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951
206View Helper - Menu
206.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
206.2 Basic usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
206.3 Calling renderMenu() directly . . . . . . . . . . . . . . . . . . . . . .
206.4 Rendering the deepest active menu . . . . . . . . . . . . . . . . . . .
206.5 Rendering with maximum depth . . . . . . . . . . . . . . . . . . . . .
206.6 Rendering with minimum depth . . . . . . . . . . . . . . . . . . . . .
206.7 Rendering only the active branch . . . . . . . . . . . . . . . . . . . .
206.8 Rendering only the active branch with minimum depth . . . . . . . . .
206.9 Rendering only the active branch with maximum depth . . . . . . . . .
206.10Rendering only the active branch with maximum depth and no parents .
206.11Rendering a custom menu using a partial view script . . . . . . . . . .

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.

955
955
956
957
958
958
959
960
961
961
962
962

207View Helper - Sitemap
207.1 Introduction . . . . . . . . . . . .
207.2 Basic usage . . . . . . . . . . . . .
207.3 Rendering using no ACL role . . .
207.4 Rendering using a maximum depth

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

965
965
966
967
968

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

208View Helper - Navigation Proxy
971
208.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971
208.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971
209Introduction to ZendPaginator

973

210Usage
210.1 Paginating data collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
210.2 The DbSelect adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
210.3 Rendering pages with view scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

975
975
976
977

xx
211Configuration

983

212Advanced usage
212.1 Custom data source adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
212.2 Custom scrolling styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
212.3 Caching features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

985
985
985
986

213Introduction to ZendPermissionsAcl
213.1 Resources . . . . . . . . . . . . .
213.2 Roles . . . . . . . . . . . . . . .
213.3 Creating the Access Control List .
213.4 Registering Roles . . . . . . . . .
213.5 Defining Access Controls . . . .
213.6 Querying an ACL . . . . . . . .

989
989
990
991
991
992
993

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

214Refining Access Controls
995
214.1 Precise Access Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995
214.2 Removing Access Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997
215Advanced Usage
999
215.1 Storing ACL Data for Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 999
215.2 Writing Conditional ACL Rules with Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 999
216Introduction to ZendPermissionsRbac
1001
216.1 Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
216.2 Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
216.3 Dynamic Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001
217Methods

1003

218Examples
218.1 Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
218.2 Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
218.3 Dynamic Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1005
. 1005
. 1006
. 1006

219Progress Bars
219.1 Introduction . . .
219.2 Basic Usage . . .
219.3 Persistent Progress
219.4 Standard Adapters

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

220File Upload Handlers
220.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
220.2 Methods of Reporting Progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
220.3 Standard Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1009
1009
1009
1009
1010

1013
. 1013
. 1013
. 1014

221Introduction to ZendSerializer
1017
221.1 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017
221.2 Basic configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018
221.3 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018
222ZendSerializerAdapter
222.1 The PhpSerialize Adapter
222.2 The IgBinary Adapter . .
222.3 The Wddx Adapter . . . .
222.4 The Json Adapter . . . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

1021
1021
1021
1021
1022
xxi
222.5 The PythonPickle Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1022
222.6 The PhpCode Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1023
223Introduction to ZendServer

1025

224ZendServerReflection
1027
224.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027
224.2 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027
225ZendServiceManager

1029

226ZendServiceManager Quick Start
1033
226.1 Using Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033
226.2 Modules as Service Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034
226.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034
227Delegator service factories
1039
227.1 Delegator factory signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039
227.2 A Delegator factory use case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039
228Lazy Services
228.1 Use cases . . . . .
228.2 Setup . . . . . . .
228.3 Practical example .
228.4 Configuration . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

1043
1043
1043
1043
1045

229Session Config
1047
229.1 Standard Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047
229.2 Session Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1048
229.3 Custom Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049
230Session Container
1051
230.1 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1051
230.2 Setting the Default Session Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1051
231Session Manager
1053
231.1 Initializing the Session Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1053
231.2 Session Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1055
232Session Save Handlers
232.1 Cache . . . . . . . . .
232.2 DbTableGateway . . .
232.3 MongoDB . . . . . .
232.4 Custom Save Handlers

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

1057
1057
1057
1058
1059

233Session Storage
233.1 Array Storage . . . . .
233.2 Session Storage . . . .
233.3 Session Array Storage
233.4 Custom Storage . . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

1061
1061
1061
1062
1062

234Session Validators
1063
234.1 Http User Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063
234.2 Remote Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063
234.3 Custom Validators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064

xxii
235ZendSoapServer
235.1 ZendSoapServer constructor . . . . .
235.2 Methods to define Web Service API . .
235.3 Request and response objects handling
235.4 Document/Literal WSDL Handling . .

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

1065
1065
1066
1067
1069

236ZendSoapClient
1071
236.1 ZendSoapClient Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1071
236.2 Performing SOAP Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1072
237WSDL Accessor
237.1 ZendSoapWsdl constructor . .
237.2 addMessage() method . . . . .
237.3 addPortType() method . . . . .
237.4 addPortOperation() method . .
237.5 addBinding() method . . . . . .
237.6 addBindingOperation() method
237.7 addSoapBinding() method . . .
237.8 addSoapOperation() method . .
237.9 addService() method . . . . . .
237.10Type mapping . . . . . . . . .
237.11addDocumentation() method . .
237.12Get finalized WSDL document

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.
.
.
.

1075
1075
1075
1076
1076
1076
1077
1077
1077
1077
1078
1079
1080

238AutoDiscovery
238.1 AutoDiscovery Introduction
238.2 Class autodiscovering . . .
238.3 Functions autodiscovering .
238.4 Autodiscovering Datatypes .
238.5 WSDL Binding Styles . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

1081
1081
1082
1083
1083
1083

.
.
.
.
.

.
.
.
.
.

239ZendStdlibHydrator
239.1 HydratorInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
239.2 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
239.3 Available Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1085
. 1085
. 1085
. 1086

240ZendStdlibHydratorFilter
240.1 Filter implementations . . . . . . . .
240.2 Remove filters . . . . . . . . . . . .
240.3 Add filters . . . . . . . . . . . . . .
240.4 Use the composite for complex filters
240.5 Using the provider interface . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

1087
1087
1088
1088
1089
1090

241ZendStdlibHydratorStrategy
1093
241.1 Adding strategies to the hydrators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1093
241.2 Available implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094
241.3 Writing custom strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1095
242ZendStdlibHydratorAggregateAggregateHydrator
1097
242.1 Installation requirements for the AggregateHydrator . . . . . . . . . . . . . . . . . . . . . . . . . . 1097
242.2 Example of AggregateHydrator usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1097
242.3 Advanced use cases of the AggregateHydrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1098
243Introduction to ZendTag

1101

xxiii
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial
Zend framework tutorial

More Related Content

What's hot

Implementing the ibm storwize v3700
Implementing the ibm storwize v3700Implementing the ibm storwize v3700
Implementing the ibm storwize v3700
Diego Alberto Tamayo
 
Tutorial
TutorialTutorial
AIX 5L Differences Guide Version 5.3 Edition
AIX 5L Differences Guide Version 5.3 EditionAIX 5L Differences Guide Version 5.3 Edition
AIX 5L Differences Guide Version 5.3 Edition
IBM India Smarter Computing
 
Ug893 vivado-ide
Ug893 vivado-ideUg893 vivado-ide
Ug893 vivado-ide
Carmel Jackoby
 
Openobject developer1
Openobject developer1Openobject developer1
Openobject developer1
openerpwiki
 
Openobject developer (2)
Openobject developer (2)Openobject developer (2)
Openobject developer (2)
openerpwiki
 
Open erp openobject-developer
Open erp openobject-developerOpen erp openobject-developer
Open erp openobject-developer
openerpwiki
 
Flask docs
Flask docsFlask docs
Flask docs
Kunal Sangwan
 
Cockpit esp
Cockpit espCockpit esp
Cockpit esp
msabry7
 
Cinelerra Video Editing Manual
Cinelerra Video Editing ManualCinelerra Video Editing Manual
Cinelerra Video Editing Manualduquoi
 
Tutorial edit
Tutorial editTutorial edit
Tutorial edit
Boris Popov
 
0802 python-tutorial
0802 python-tutorial0802 python-tutorial
0802 python-tutorial
Zahid Hasan
 
Python programming
Python programmingPython programming
Python programming
Keshav Gupta
 
An introduction to tivoli net view for os 390 v1r2 sg245224
An introduction to tivoli net view for os 390 v1r2 sg245224An introduction to tivoli net view for os 390 v1r2 sg245224
An introduction to tivoli net view for os 390 v1r2 sg245224Banking at Ho Chi Minh city
 
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...Banking at Ho Chi Minh city
 
Migrating to netcool precision for ip networks --best practices for migrating...
Migrating to netcool precision for ip networks --best practices for migrating...Migrating to netcool precision for ip networks --best practices for migrating...
Migrating to netcool precision for ip networks --best practices for migrating...Banking at Ho Chi Minh city
 

What's hot (17)

Implementing the ibm storwize v3700
Implementing the ibm storwize v3700Implementing the ibm storwize v3700
Implementing the ibm storwize v3700
 
Tutorial
TutorialTutorial
Tutorial
 
AIX 5L Differences Guide Version 5.3 Edition
AIX 5L Differences Guide Version 5.3 EditionAIX 5L Differences Guide Version 5.3 Edition
AIX 5L Differences Guide Version 5.3 Edition
 
Ug893 vivado-ide
Ug893 vivado-ideUg893 vivado-ide
Ug893 vivado-ide
 
Openobject developer1
Openobject developer1Openobject developer1
Openobject developer1
 
Openobject developer (2)
Openobject developer (2)Openobject developer (2)
Openobject developer (2)
 
Open erp openobject-developer
Open erp openobject-developerOpen erp openobject-developer
Open erp openobject-developer
 
Flask docs
Flask docsFlask docs
Flask docs
 
R Admin
R AdminR Admin
R Admin
 
Cockpit esp
Cockpit espCockpit esp
Cockpit esp
 
Cinelerra Video Editing Manual
Cinelerra Video Editing ManualCinelerra Video Editing Manual
Cinelerra Video Editing Manual
 
Tutorial edit
Tutorial editTutorial edit
Tutorial edit
 
0802 python-tutorial
0802 python-tutorial0802 python-tutorial
0802 python-tutorial
 
Python programming
Python programmingPython programming
Python programming
 
An introduction to tivoli net view for os 390 v1r2 sg245224
An introduction to tivoli net view for os 390 v1r2 sg245224An introduction to tivoli net view for os 390 v1r2 sg245224
An introduction to tivoli net view for os 390 v1r2 sg245224
 
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...
Ibm tivoli intelligent think dynamic orchestrator pre proof of-concept cookbo...
 
Migrating to netcool precision for ip networks --best practices for migrating...
Migrating to netcool precision for ip networks --best practices for migrating...Migrating to netcool precision for ip networks --best practices for migrating...
Migrating to netcool precision for ip networks --best practices for migrating...
 

Similar to Zend framework tutorial

Openobject developer
Openobject developerOpenobject developer
Openobject developer
Ali Mashduqi
 
Openobject developer
Openobject developerOpenobject developer
Openobject developer
openerpwiki
 
W java81
W java81W java81
W java81
rasikow
 
advanced java.pdf
advanced java.pdfadvanced java.pdf
advanced java.pdf
Ali Bozkurt
 
Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbook
Pascal Louis
 
Gdfs sg246374
Gdfs sg246374Gdfs sg246374
Gdfs sg246374Accenture
 
Ref arch for ve sg248155
Ref arch for ve sg248155Ref arch for ve sg248155
Ref arch for ve sg248155Accenture
 
Java-Design-Patterns.pdf
Java-Design-Patterns.pdfJava-Design-Patterns.pdf
Java-Design-Patterns.pdf
badrfathallah2
 
Advanced-java.pptx
Advanced-java.pptxAdvanced-java.pptx
Advanced-java.pptx
MiltonMolla1
 
VBoxUserManual.pdf
VBoxUserManual.pdfVBoxUserManual.pdf
VBoxUserManual.pdf
vladvah77
 
Embedded linux barco-20121001
Embedded linux barco-20121001Embedded linux barco-20121001
Embedded linux barco-20121001
Marc Leeman
 
Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)
youssef bouferdou
 
0802 python-tutorial
0802 python-tutorial0802 python-tutorial
0802 python-tutorial
urvishathummar1
 
eclipse.pdf
eclipse.pdfeclipse.pdf
eclipse.pdf
PerPerso
 
Learn Makefiles With the tastiest examples
Learn Makefiles With the tastiest examplesLearn Makefiles With the tastiest examples
Learn Makefiles With the tastiest examples
Ahmed Abdelazeem
 
Odoo development
Odoo developmentOdoo development
Odoo development
Ramzi Hajjaji
 

Similar to Zend framework tutorial (20)

Openobject developer
Openobject developerOpenobject developer
Openobject developer
 
Openobject developer
Openobject developerOpenobject developer
Openobject developer
 
W java81
W java81W java81
W java81
 
advanced java.pdf
advanced java.pdfadvanced java.pdf
advanced java.pdf
 
Hdclone
HdcloneHdclone
Hdclone
 
Docker containerization cookbook
Docker containerization cookbookDocker containerization cookbook
Docker containerization cookbook
 
Gdfs sg246374
Gdfs sg246374Gdfs sg246374
Gdfs sg246374
 
Ref arch for ve sg248155
Ref arch for ve sg248155Ref arch for ve sg248155
Ref arch for ve sg248155
 
Java-Design-Patterns.pdf
Java-Design-Patterns.pdfJava-Design-Patterns.pdf
Java-Design-Patterns.pdf
 
Advanced-java.pptx
Advanced-java.pptxAdvanced-java.pptx
Advanced-java.pptx
 
VBoxUserManual.pdf
VBoxUserManual.pdfVBoxUserManual.pdf
VBoxUserManual.pdf
 
Embedded linux barco-20121001
Embedded linux barco-20121001Embedded linux barco-20121001
Embedded linux barco-20121001
 
Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)Best Python tutorial (release 3.7.0)
Best Python tutorial (release 3.7.0)
 
Python everthing
Python everthingPython everthing
Python everthing
 
0802 python-tutorial
0802 python-tutorial0802 python-tutorial
0802 python-tutorial
 
Zwcad2011 tutorialbook+
Zwcad2011 tutorialbook+Zwcad2011 tutorialbook+
Zwcad2011 tutorialbook+
 
Swi prolog-6.2.6
Swi prolog-6.2.6Swi prolog-6.2.6
Swi prolog-6.2.6
 
eclipse.pdf
eclipse.pdfeclipse.pdf
eclipse.pdf
 
Learn Makefiles With the tastiest examples
Learn Makefiles With the tastiest examplesLearn Makefiles With the tastiest examples
Learn Makefiles With the tastiest examples
 
Odoo development
Odoo developmentOdoo development
Odoo development
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 

Zend framework tutorial

  • 1. Zend Framework 2 Documentation Release 2.2.5 Zend Technologies Ltd. October 31, 2013
  • 2.
  • 3. Contents 1 Overview 1 2 Installation 3 3 Getting Started with Zend Framework 2 3.1 Some assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 The tutorial application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 5 4 Getting started: A skeleton application 4.1 Using the Apache Web Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Error reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8 9 5 Modules 5.1 Setting up the Album module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Informing the application about our new module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 13 13 6 Routing and controllers 15 7 Create the controller 7.1 Initialise the view scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 18 8 Database and models 8.1 The database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 The model files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3 Using ServiceManager to configure the table gateway and inject into the AlbumTable . 8.4 Back to the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.5 Listing albums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 19 19 21 23 23 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Styling and Translations 10 Forms and actions 10.1 Adding new albums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.2 Editing an album . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10.3 Deleting an album . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 29 29 34 36 i
  • 4. 10.4 Ensuring that the home page displays the list of albums . . . . . . . . . . . . . . . . . . . . . . . . . 11 Conclusion 38 39 12 Zend Framework Tool (ZFTool) 12.1 Installation using Composer . . . . . . . 12.2 Manual installation . . . . . . . . . . . . 12.3 Without installation, using the PHAR file 12.4 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 41 41 41 42 13 Learning Dependency Injection 13.1 Very brief introduction to Di. . . . . . . . . . . . . . . 13.2 Simplest usage case (2 classes, one consumes the other) 13.3 Simplest Usage Case Without Type-hints . . . . . . . . 13.4 Simplest usage case with Compiled Definition . . . . . 13.5 Creating a precompiled definition for others to use . . . 13.6 Using Multiple Definitions From Multiple Sources . . . 13.7 Generating Service Locators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 45 45 47 48 50 50 51 14 Unit Testing a Zend Framework 2 application 14.1 Setting up the tests directory . . . . . . . . . 14.2 Bootstrapping your tests . . . . . . . . . . . 14.3 Your first controller test . . . . . . . . . . . 14.4 A failing test case . . . . . . . . . . . . . . 14.5 Configuring the service manager for the tests 14.6 Testing actions with POST . . . . . . . . . . 14.7 Testing model entities . . . . . . . . . . . . 14.8 Testing model tables . . . . . . . . . . . . . 14.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 55 56 58 59 60 61 62 64 68 15 Using the EventManager 15.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.2 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15.3 Shared managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 69 69 71 16 Wildcards 73 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Listener aggregates 17.1 Introspecting results . . . . . . . . . . . . . . . . . . . . 17.2 Short-ciruiting listener execution . . . . . . . . . . . . . 17.3 Keeping it in order . . . . . . . . . . . . . . . . . . . . . 17.4 Custom event objects . . . . . . . . . . . . . . . . . . . . 17.5 Putting it together: Implementing a simple caching system 17.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 76 76 77 78 79 81 18 Advanced Configuration Tricks 18.1 System configuration . . . . . . . 18.2 Module Configuration . . . . . . 18.3 Configuration mapping table . . . 18.4 Configuration Priority . . . . . . 18.5 Configuration merging workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 83 87 88 88 88 19 Using ZendNavigation in your Album Module 19.1 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.2 Setting Up ZendNavigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 91 91 ii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  • 5. 19.3 Configuring our Site Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.4 Adding the Menu View Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19.5 Adding Breadcrumbs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Using ZendPaginator in your Album Module 20.1 Preparation . . . . . . . . . . . . . . . . 20.2 Modifying the AlbumTable . . . . . . . 20.3 Modifying the AlbumController . . . . . 20.4 Updating the View Script . . . . . . . . 20.5 Creating the Pagination Control Partial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 93 93 95 . 95 . 98 . 99 . 99 . 100 21 Using the PaginationControl View Helper 103 22 Setting up a database adapter 105 22.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 22.2 Basic setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 22.3 Setting a static adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 23 Migration from Zend Framework 1 107 24 Namespacing Old Classes 109 24.1 Namespacing a ZF1 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 24.2 HOWTO Namespace Your Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 25 Running Zend Framework 2 and Zend Framework 1 in parallel 25.1 Use ZF2 in a ZF1 project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.2 Use ZF1 in a ZF2 project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25.3 Run ZF1 and ZF2 together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 113 114 114 26 Introduction to ZendAuthentication 26.1 Adapters . . . . . . . . . . . . 26.2 Results . . . . . . . . . . . . . 26.3 Identity Persistence . . . . . . . 26.4 Usage . . . . . . . . . . . . . . 117 117 118 119 122 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Database Table Authentication 125 27.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 27.2 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 27.3 Advanced Usage: Persisting a DbTable Result Object . . . . . . . . . . . . . . . . . . . . . . . . . . 128 28 Digest Authentication 28.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28.2 Specifics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28.3 Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 131 131 131 29 HTTP Authentication Adapter 29.1 Introduction . . . . . . . 29.2 Design Overview . . . . . 29.3 Configuration Options . . 29.4 Resolvers . . . . . . . . . 29.5 Basic Usage . . . . . . . . . . . . 133 133 133 134 134 135 30 LDAP Authentication 30.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30.2 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30.3 The API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 137 137 139 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
  • 6. 30.4 Server Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 30.5 Collecting Debugging Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 30.6 Common Options for Specific Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 31 Authentication Validator 145 31.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 31.2 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 32 Introduction to ZendBarcode 147 33 Barcode creation using ZendBarcodeBarcode class 149 33.1 Using ZendBarcodeBarcode::factory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 33.2 Drawing a barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 33.3 Rendering a barcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 34 ZendBarcodeBarcode Objects 153 34.1 Common Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 34.2 Common Additional Getters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 34.3 Description of shipped barcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 35 ZendBarcode Renderers 163 35.1 Common Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 35.2 ZendBarcodeRendererImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 35.3 ZendBarcodeRendererPdf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 36 ZendCacheStorageAdapter 36.1 Overview . . . . . . . . . . . . . . . 36.2 Quick Start . . . . . . . . . . . . . . 36.3 Basic Configuration Options . . . . . 36.4 The StorageInterface . . . . . . . . . 36.5 The AvailableSpaceCapableInterface 36.6 The TotalSpaceCapableInterface . . . 36.7 The ClearByNamespaceInterface . . 36.8 The ClearByPrefixInterface . . . . . 36.9 The ClearExpiredInterface . . . . . . 36.10 The FlushableInterface . . . . . . . . 36.11 The IterableInterface . . . . . . . . . 36.12 The OptimizableInterface . . . . . . 36.13 The TaggableInterface . . . . . . . . 36.14 The Apc Adapter . . . . . . . . . . . 36.15 The Dba Adapter . . . . . . . . . . . 36.16 The Filesystem Adapter . . . . . . . 36.17 The Memcached Adapter . . . . . . 36.18 The Memory Adapter . . . . . . . . 36.19 The WinCache Adapter . . . . . . . 36.20 The XCache Adapter . . . . . . . . . 36.21 The ZendServerDisk Adapter . . . . 36.22 The ZendServerShm Adapter . . . . 36.23 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 165 165 166 166 168 168 169 169 169 169 169 170 170 170 171 172 173 174 175 176 177 177 178 37 ZendCacheStorageCapabilities 37.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37.2 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 181 181 183 iv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  • 7. 38 ZendCacheStoragePlugin 38.1 Overview . . . . . . . . . . . . . 38.2 Quick Start . . . . . . . . . . . . 38.3 The ClearExpiredByFactor Plugin 38.4 The ExceptionHandler Plugin . . 38.5 The IgnoreUserAbort Plugin . . . 38.6 The OptimizeByFactor Plugin . . 38.7 The Serializer Plugin . . . . . . . 38.8 Available Methods . . . . . . . . 38.9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 185 185 186 186 186 186 187 187 188 39 ZendCachePattern 189 39.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 39.2 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 39.3 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 40 ZendCachePatternCallbackCache 40.1 Overview . . . . . . . . . . . . 40.2 Quick Start . . . . . . . . . . . 40.3 Configuration Options . . . . . 40.4 Available Methods . . . . . . . 40.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 191 191 191 192 192 41 ZendCachePatternClassCache 41.1 Overview . . . . . . . . . . 41.2 Quick Start . . . . . . . . . 41.3 Configuration Options . . . 41.4 Available Methods . . . . . 41.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 193 193 193 194 194 42 ZendCachePatternObjectCache 42.1 Overview . . . . . . . . . . . 42.2 Quick Start . . . . . . . . . . 42.3 Configuration Options . . . . 42.4 Available Methods . . . . . . 42.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 197 197 198 198 199 43 ZendCachePatternOutputCache 43.1 Overview . . . . . . . . . . . 43.2 Quick Start . . . . . . . . . . 43.3 Configuration Options . . . . 43.4 Available Methods . . . . . . 43.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 201 201 201 201 202 44 ZendCachePatternCaptureCache 44.1 Overview . . . . . . . . . . . . 44.2 Quick Start . . . . . . . . . . . 44.3 Configuration Options . . . . . 44.4 Available Methods . . . . . . . 44.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 203 203 204 204 205 45 Introduction to ZendCaptcha 207 46 Captcha Operation 209 v
  • 8. 47 CAPTCHA Adapters 47.1 ZendCaptchaAbstractWord 47.2 ZendCaptchaDumb . . . . 47.3 ZendCaptchaFiglet . . . . 47.4 ZendCaptchaImage . . . . 47.5 ZendCaptchaReCaptcha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 211 212 212 212 213 48 Introduction to ZendConfig 215 48.1 Using ZendConfigConfig with a Reader Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 48.2 Using ZendConfigConfig with a PHP Configuration File . . . . . . . . . . . . . . . . . . . . . . . 216 49 Theory of Operation 50 ZendConfigReader 50.1 ZendConfigReaderIni . 50.2 ZendConfigReaderXml 50.3 ZendConfigReaderJson 50.4 ZendConfigReaderYaml 217 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 219 220 222 223 51 ZendConfigWriter 51.1 ZendConfigWriterIni . . . . 51.2 ZendConfigWriterXml . . . 51.3 ZendConfigWriterPhpArray 51.4 ZendConfigWriterJson . . . 51.5 ZendConfigWriterYaml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 225 226 227 228 228 52 ZendConfigProcessor 52.1 ZendConfigProcessorConstant . 52.2 ZendConfigProcessorFilter . . 52.3 ZendConfigProcessorQueue . . 52.4 ZendConfigProcessorToken . . 52.5 ZendConfigProcessorTranslator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 231 232 232 233 233 . . . . 53 The Factory 235 53.1 Loading configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 53.2 Storing configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 54 Introduction to ZendConsole 237 54.1 Writing console routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 54.2 Handling console requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 54.3 Adding console usage info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 55 Console routes and routing 55.1 Router configuration . . . 55.2 Basic route . . . . . . . . 55.3 Catchall route . . . . . . . 55.4 Console routes cheat-sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 243 244 248 249 56 Console-aware modules 251 56.1 Application banner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 56.2 Usage information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 56.3 Best practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 57 Console-aware action controllers 261 57.1 Handling console requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 57.2 Sending output to console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 vi
  • 9. 57.3 Are we in a console? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 57.4 Reading values from console parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 58 Console adapters 269 58.1 Retrieving console adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 58.2 Using console adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 59 Console prompts 59.1 Confirm . . 59.2 Line . . . . 59.3 Char . . . 59.4 Select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 274 274 275 276 60 Introduction to ZendCrypt 279 61 Encrypt/decrypt using block ciphers 281 62 Key derivation function 283 62.1 Pbkdf2 adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 62.2 SaltedS2k adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 62.3 Scrypt adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 63 Password 287 63.1 Bcrypt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 63.2 Apache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 64 Public key cryptography 291 64.1 Diffie-Hellman . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 64.2 RSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 65 ZendDbAdapter 65.1 Creating an Adapter - Quickstart . . . . . . . . . . . . . . . . . 65.2 Creating an Adapter Using Dependency Injection . . . . . . . . 65.3 Query Preparation Through ZendDbAdapterAdapter::query() 65.4 Query Execution Through ZendDbAdapterAdapter::query() . 65.5 Creating Statements . . . . . . . . . . . . . . . . . . . . . . . 65.6 Using the Driver Object . . . . . . . . . . . . . . . . . . . . . 65.7 Using The Platform Object . . . . . . . . . . . . . . . . . . . . 65.8 Using The Parameter Container . . . . . . . . . . . . . . . . . 65.9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 297 298 298 299 299 299 301 302 303 66 ZendDbResultSet 66.1 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66.2 ZendDbResultSetResultSet and ZendDbResultSetAbstractResultSet . . . . . . . . . . . . . . . . 66.3 ZendDbResultSetHydratingResultSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 305 306 306 67 ZendDbSql 67.1 ZendDbSqlSql (Quickstart) . . . . . . . . . . 67.2 ZendDbSql’s Select, Insert, Update and Delete 67.3 ZendDbSqlSelect . . . . . . . . . . . . . . . . 67.4 ZendDbSqlInsert . . . . . . . . . . . . . . . . 67.5 ZendDbSqlUpdate . . . . . . . . . . . . . . . 67.6 ZendDbSqlDelete . . . . . . . . . . . . . . . 67.7 ZendDbSqlWhere & ZendDbSqlHaving . . 309 309 310 310 313 314 314 314 68 ZendDbSqlDdl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 vii
  • 10. 69 Creating Tables 323 70 Altering Tables 325 71 Dropping Tables 327 72 Executing DDL Statements 329 73 Currently Supported Data Types 331 74 Currently Supported Constraint Types 333 75 ZendDbTableGateway 335 75.1 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 75.2 TableGateway Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 76 ZendDbRowGateway 339 76.1 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 76.2 ActiveRecord Style Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 77 ZendDbMetadata 341 77.1 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 78 Introduction to ZendDi 345 78.1 Dependency Injection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 78.2 Dependency Injection Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 79 ZendDi Quickstart 80 ZendDi Definition 80.1 DefinitionList . . . 80.2 RuntimeDefinition 80.3 CompilerDefinition 80.4 ClassDefinition . . 347 . . . . 351 351 351 352 353 81 ZendDi InstanceManager 81.1 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2 Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3 Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 355 356 357 82 ZendDi Configuration 359 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 ZendDi Debugging & Complex Use Cases 361 83.1 Debugging a DiC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 83.2 Complex Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 84 Introduction to ZendDom 365 85 ZendDomQuery 367 85.1 Theory of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 85.2 Methods Available . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 86 Introduction to ZendEscaper 371 86.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 86.2 What ZendEscaper is not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 viii
  • 11. 87 Theory of Operation 373 87.1 The Problem with Inconsistent Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 87.2 Why Contextual Escaping? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 88 Configuring ZendEscaper 377 89 Escaping HTML 379 89.1 Examples of Bad HTML Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 89.2 Examples of Good HTML Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 90 Escaping HTML Attributes 381 90.1 Examples of Bad HTML Attribute Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 90.2 Examples of Good HTML Attribute Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 91 Escaping Javascript 385 91.1 Examples of Bad Javascript Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 91.2 Examples of Good Javascript Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 92 Escaping Cascading Style Sheets 387 92.1 Examples of Bad CSS Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 92.2 Examples of Good CSS Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 93 Escaping URLs 389 93.1 Examples of Bad URL Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 93.2 Examples of Good URL Escaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 94 The EventManager 94.1 Overview . . . . . . . 94.2 Quick Start . . . . . . 94.3 Configuration Options 94.4 Available Methods . . 94.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 391 391 394 395 396 95 Introduction to ZendFeed 401 95.1 Reading RSS Feed Data with ZendFeedReader . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 96 Importing Feeds 403 96.1 Dumping the contents of a feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 97 Retrieving Feeds from Web Pages 405 97.1 Find Feed Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 98 Consuming an RSS Feed 407 98.1 Reading a feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 98.2 Get properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 99 Consuming an Atom Feed 409 99.1 Basic Use of an Atom Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 100Consuming a Single Atom Entry 411 100.1 Reading a Single-Entry Atom Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 101ZendFeed and Security 413 101.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 101.2 Filtering data using HTMLPurifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 101.3 Escaping data using ZendEscaper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 ix
  • 12. 102ZendFeedReaderReader 102.1 Introduction . . . . . . . . . . . . . . . . . . 102.2 Importing Feeds . . . . . . . . . . . . . . . . 102.3 Retrieving Underlying Feed and Entry Sources 102.4 Cache Support and Intelligent Requests . . . . 102.5 Locating Feed URIs from Websites . . . . . . 102.6 Attribute Collections . . . . . . . . . . . . . . 102.7 Retrieving Feed Information . . . . . . . . . . 102.8 Retrieving Entry/Item Information . . . . . . . 102.9 Extending Feed and Entry APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 417 417 418 419 420 421 421 424 426 103ZendFeedWriterWriter 103.1 Introduction . . . . . . . 103.2 Architecture . . . . . . . 103.3 Getting Started . . . . . . 103.4 Setting Feed Data Points . 103.5 Setting Entry Data Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 431 431 432 434 436 104ZendFeedPubSubHubbub 104.1 What is PubSubHubbub? . . . . . . . . 104.2 Architecture . . . . . . . . . . . . . . 104.3 ZendFeedPubSubHubbubPublisher . 104.4 ZendFeedPubSubHubbubSubscriber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 439 439 440 441 105ZendFileClassFileLocator 105.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.2 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 447 447 447 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Introduction to ZendFilter 449 106.1 What is a filter? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 106.2 Basic usage of filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 107Using the StaticFilter 451 107.1 Double filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 108Standard Filter Classes 108.1 Alnum . . . . . . . . . . . 108.2 Alpha . . . . . . . . . . . . 108.3 BaseName . . . . . . . . . 108.4 Boolean . . . . . . . . . . . 108.5 Callback . . . . . . . . . . 108.6 Compress and Decompress . 108.7 Digits . . . . . . . . . . . . 108.8 Dir . . . . . . . . . . . . . 108.9 Encrypt and Decrypt . . . . 108.10HtmlEntities . . . . . . . . 108.11Int . . . . . . . . . . . . . . 108.12Null . . . . . . . . . . . . . 108.13NumberFormat . . . . . . . 108.14PregReplace . . . . . . . . 108.15RealPath . . . . . . . . . . 108.16StringToLower . . . . . . . 108.17StringToUpper . . . . . . . 108.18StringTrim . . . . . . . . . x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 453 454 454 455 458 459 464 465 465 471 473 473 474 475 476 477 478 478
  • 13. 108.19StripNewLines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 108.20StripTags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 108.21UriNormalize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 109Word Filters 109.1 CamelCaseToDash . . . . 109.2 CamelCaseToSeparator . 109.3 CamelCaseToUnderscore 109.4 DashToCamelCase . . . . 109.5 DashToSeparator . . . . . 109.6 DashToUnderscore . . . . 109.7 SeparatorToCamelCase . 109.8 SeparatorToDash . . . . . 109.9 SeparatorToSeparator . . 109.10UnderscoreToCamelCase 109.11UnderscoreToSeparator . 109.12UnderscoreToDash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 483 483 484 484 485 485 486 486 487 488 488 489 110File Filter Classes 110.1 Decrypt . . . . 110.2 Encrypt . . . . 110.3 Lowercase . . 110.4 Rename . . . . 110.5 RenameUpload 110.6 Uppercase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 491 491 491 491 493 494 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Filter Chains 495 111.1 Setting Filter Chain Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 111.2 Using the Plugin Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 112ZendFilterInflector 112.1 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Using Custom Filters . . . . . . . . . . . . . . . . . . . . 112.3 Setting the Inflector Target . . . . . . . . . . . . . . . . . 112.4 Inflection Rules . . . . . . . . . . . . . . . . . . . . . . . 112.5 Utility Methods . . . . . . . . . . . . . . . . . . . . . . . 112.6 Using a Traversable or an array with ZendFilterInflector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 497 498 498 499 501 501 113Writing Filters 503 114Introduction to ZendForm 505 115Form Quick Start 115.1 Programmatic Form Creation . 115.2 Creation via Factory . . . . . . 115.3 Factory-backed Form Extension 115.4 Validating Forms . . . . . . . . 115.5 Hinting to the Input Filter . . . 115.6 Binding an object . . . . . . . . 115.7 Rendering . . . . . . . . . . . 115.8 Validation Groups . . . . . . . 115.9 Using Annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 507 508 512 513 514 516 517 520 521 116Form Collections 525 116.1 Creating Fieldsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 xi
  • 14. 116.2 116.3 116.4 116.5 116.6 The Form Element . . . . . . . . . . . . . . The Controller . . . . . . . . . . . . . . . . The View . . . . . . . . . . . . . . . . . . . Adding New Elements Dynamically . . . . . Validation groups for fieldsets and collection 117File Uploading 117.1 Standard Example . . . . . . 117.2 File Post-Redirect-Get Plugin 117.3 HTML5 Multi-File Uploads . 117.4 Upload Progress . . . . . . . 117.5 Additional Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 533 534 535 537 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 541 544 546 547 551 118Advanced use of forms 118.1 Short names . . . . . . . . . . 118.2 Creating custom elements . . . 118.3 Handling dependencies . . . . . 118.4 The specific case of initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 553 553 557 559 119Form Elements 119.1 Introduction . . . . 119.2 Element Base Class 119.3 Standard Elements . 119.4 HTML5 Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 561 561 563 578 120Form View Helpers 120.1 Introduction . . . . . . . . . 120.2 Standard Helpers . . . . . . . 120.3 HTML5 Helpers . . . . . . . 120.4 File Upload Progress Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 593 593 605 609 . . . . . . . . . . . . . . . . 121Overview of ZendHttp 611 121.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 121.2 ZendHttp Request, Response and Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 122The Request Class 122.1 Overview . . . . . . . 122.2 Quick Start . . . . . . 122.3 Configuration Options 122.4 Available Methods . . 122.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 613 613 614 614 617 123The Response Class 123.1 Overview . . . . . . . 123.2 Quick Start . . . . . . 123.3 Configuration Options 123.4 Available Methods . . 123.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 619 619 620 620 623 124The Headers Class 124.1 Overview . . . . . . . . . . . . . . 124.2 Quick Start . . . . . . . . . . . . . 124.3 Configuration Options . . . . . . . 124.4 Available Methods . . . . . . . . . 124.5 ZendHttpHeader* Base Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 625 625 626 626 628 xii
  • 15. 124.6 List of HTTP Header Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 124.7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 125HTTP Client - Overview 125.1 Overview . . . . . . . 125.2 Quick Start . . . . . . 125.3 Configuration Options 125.4 Available Methods . . 125.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 633 633 634 634 638 126HTTP Client - Connection Adapters 126.1 Overview . . . . . . . . . . . . . . . . 126.2 The Socket Adapter . . . . . . . . . . 126.3 The Proxy Adapter . . . . . . . . . . . 126.4 The cURL Adapter . . . . . . . . . . . 126.5 The Test Adapter . . . . . . . . . . . . 126.6 Creating your own connection adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 641 641 644 645 646 648 127HTTP Client - Advanced Usage 127.1 HTTP Redirections . . . . . . . . . . . . . . . . 127.2 Adding Cookies and Using Cookie Persistence . 127.3 Setting Custom Request Headers . . . . . . . . 127.4 File Uploads . . . . . . . . . . . . . . . . . . . 127.5 Sending Raw POST Data . . . . . . . . . . . . 127.6 HTTP Authentication . . . . . . . . . . . . . . 127.7 Sending Multiple Requests With the Same Client 127.8 Data Streaming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651 651 651 653 654 654 655 655 656 128HTTP Client - Static Usage 128.1 Overview . . . . . . . 128.2 Quick Start . . . . . . 128.3 Configuration Options 128.4 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 659 659 659 660 129Translating 129.1 Adding translations . 129.2 Supported formats . 129.3 Setting a locale . . . 129.4 Translating messages 129.5 Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 661 662 662 662 662 130I18n View Helpers 130.1 Introduction . . . . . . . 130.2 CurrencyFormat Helper . 130.3 DateFormat Helper . . . . 130.4 NumberFormat Helper . . 130.5 Plural Helper . . . . . . . 130.6 Translate Helper . . . . . 130.7 TranslatePlural Helper . . 130.8 Abstract Translator Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 663 663 665 666 667 668 669 670 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131I18n Filters 671 131.1 Alnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 131.2 Alpha . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 131.3 NumberFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 xiii
  • 16. 131.4 NumberParse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 132I18n Validators 675 133Float 677 133.1 Supported options for ZendI18nValidatorFloat . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 133.2 Simple float validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 133.3 Localized float validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 134Int 679 134.1 Supported options for ZendI18nValidatorInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 134.2 Simple integer validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 134.3 Localized integer validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 135Introduction to ZendInputFilter 681 136File Upload Input 685 137Introduction to ZendJson 687 138Basic Usage 689 138.1 Pretty-printing JSON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 139Advanced Usage of ZendJson 139.1 JSON Objects . . . . . . 139.2 Encoding PHP objects . . 139.3 Internal Encoder/Decoder 139.4 JSON Expressions . . . . . . . . 140XML to JSON conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 691 691 692 692 693 141ZendJsonServer - JSON-RPC server 695 141.1 Advanced Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 142Introduction to ZendLdap 703 142.1 Theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 143API overview 707 143.1 Configuration / options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 143.2 API Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708 144ZendLdapLdap 709 144.1 ZendLdapCollection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710 145ZendLdapAttribute 711 146ZendLdapConverterConverter 713 147ZendLdapDn 715 148ZendLdapFilter 717 149ZendLdapNode 719 150ZendLdapNodeRootDse 721 150.1 OpenLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 150.2 ActiveDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 xiv
  • 17. 150.3 eDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 151ZendLdapNodeSchema 727 151.1 OpenLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729 151.2 ActiveDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 152ZendLdapLdifEncoder 731 153Usage Scenarios 733 153.1 Authentication scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 153.2 Basic CRUD operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 153.3 Extended operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 154Tools 154.1 Creation and modification of DN strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.2 Using the filter API to create search filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154.3 Modify LDAP entries using the Attribute API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 737 737 737 155Object-oriented access to the LDAP tree using ZendLdapNode 155.1 Basic CRUD operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.2 Extended operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.3 Tree traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 739 739 739 156Getting information from the LDAP server 741 156.1 RootDSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 156.2 Schema Browsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 157Serializing LDAP data to and from LDIF 743 157.1 Serialize a LDAP entry to LDIF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743 157.2 Deserialize a LDIF string into a LDAP entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744 158The AutoloaderFactory 158.1 Overview . . . . . . . 158.2 Quick Start . . . . . . 158.3 Configuration Options 158.4 Available Methods . . 158.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747 747 747 748 748 748 159The StandardAutoloader 159.1 Overview . . . . . . . 159.2 Quick Start . . . . . . 159.3 Configuration Options 159.4 Available Methods . . 159.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 749 750 751 751 752 160The ClassMapAutoloader 160.1 Overview . . . . . . . 160.2 Quick Start . . . . . . 160.3 Configuration Options 160.4 Available Methods . . 160.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753 753 753 754 754 755 161The ModuleAutoloader 161.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.2 Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.3 Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757 757 757 757 xv
  • 18. 161.4 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 161.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758 162The SplAutoloader Interface 162.1 Overview . . . . . . . . 162.2 Quick Start . . . . . . . 162.3 Configuration Options . 162.4 Available Methods . . . 162.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 759 759 760 760 761 163The PluginClassLoader 163.1 Overview . . . . . . . 163.2 Quick Start . . . . . . 163.3 Configuration Options 163.4 Available Methods . . 163.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763 763 763 764 764 765 164The ShortNameLocator Interface 164.1 Overview . . . . . . . . . . . 164.2 Quick Start . . . . . . . . . . 164.3 Configuration Options . . . . 164.4 Available Methods . . . . . . 164.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769 769 769 770 770 770 165The PluginClassLocator interface 165.1 Overview . . . . . . . . . . . 165.2 Quick Start . . . . . . . . . . 165.3 Configuration Options . . . . 165.4 Available Methods . . . . . . 165.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 771 771 771 771 771 772 . . . . . 166The Class Map Generator utility: bin/classmap_generator.php 773 166.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 166.2 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 166.3 Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 167Overview of ZendLog 167.1 Creating a Log . . . . . . 167.2 Logging Messages . . . . 167.3 Destroying a Log . . . . . 167.4 Using Built-in Priorities . 167.5 Understanding Log Events 167.6 Log PHP Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775 775 776 776 776 777 777 168Writers 168.1 Writing to Streams . . . 168.2 Writing to Databases . . 168.3 Writing to FirePHP . . . 168.4 Stubbing Out the Writer 168.5 Testing with the Mock . 168.6 Compositing Writers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779 779 780 781 781 781 782 . . . . . . 169Filters 783 169.1 Available filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783 xvi
  • 19. 170Formatters 170.1 Simple Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170.2 Formatting to XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170.3 Formatting to FirePhp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785 785 786 786 171Introduction to ZendMail 787 171.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 171.2 Configuring the default sendmail transport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788 172ZendMailMessage 172.1 Overview . . . . . . . 172.2 Quick Start . . . . . . 172.3 Configuration Options 172.4 Available Methods . . 172.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 789 789 791 791 794 173ZendMailTransport 173.1 Overview . . . . . . . 173.2 Quick Start . . . . . . 173.3 Configuration Options 173.4 Available Methods . . 173.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 795 795 795 796 797 797 174ZendMailTransportSmtpOptions 174.1 Overview . . . . . . . . . . . . 174.2 Quick Start . . . . . . . . . . . 174.3 Configuration Options . . . . . 174.4 Available Methods . . . . . . . 174.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799 799 799 801 801 802 175ZendMailTransportFileOptions 175.1 Overview . . . . . . . . . . . 175.2 Quick Start . . . . . . . . . . 175.3 Configuration Options . . . . 175.4 Available Methods . . . . . . 175.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803 803 803 803 804 804 . . . . . 176Introduction to ZendMath 805 176.1 Random number generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805 176.2 Big integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806 177ZendMime 809 177.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809 177.2 Static Methods and Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809 177.3 Instantiating ZendMime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 810 178ZendMimeMessage 178.1 Introduction . . . . . . . . . . . . . . . . . . . . . . 178.2 Instantiation . . . . . . . . . . . . . . . . . . . . . . 178.3 Adding MIME Parts . . . . . . . . . . . . . . . . . . 178.4 Boundary handling . . . . . . . . . . . . . . . . . . . 178.5 Parsing a string to create a ZendMimeMessage object 178.6 Available methods . . . . . . . . . . . . . . . . . . . 179ZendMimePart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811 811 811 811 811 812 812 813 xvii
  • 20. 179.1 179.2 179.3 179.4 Introduction . . . . . . . . . . . . . . . . . . . . Instantiation . . . . . . . . . . . . . . . . . . . . Methods for rendering the message part to a string Available methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813 813 813 814 180Introduction to the Module System 815 180.1 The autoload_*.php Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816 181The Module Manager 817 181.1 Module Manager Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817 181.2 Module Manager Listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817 182The Module Class 182.1 A Minimal Module . . . . . . . 182.2 A Typical Module Class . . . . 182.3 The “loadModules.post” Event 182.4 The MVC “bootstrap” Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 821 821 822 823 183The Module Autoloader 825 183.1 Module Autoloader Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 183.2 Non-Standard / Explicit Module Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 826 183.3 Packaging Modules with Phar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827 184Best Practices when Creating Modules 829 185Introduction to the MVC Layer 185.1 Basic Application Structure . . . . . 185.2 Basic Module Structure . . . . . . . 185.3 Bootstrapping an Application . . . . 185.4 Bootstrapping a Modular Application 185.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 832 832 834 836 837 186Quick Start 186.1 Install the Zend Skeleton Application . 186.2 Create a New Module . . . . . . . . . 186.3 Update the Module Class . . . . . . . . 186.4 Create a Controller . . . . . . . . . . . 186.5 Create a View Script . . . . . . . . . . 186.6 Create a Route . . . . . . . . . . . . . 186.7 Tell the Application About our Module 186.8 Test it Out! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839 839 840 840 841 842 842 844 845 187Default Services 187.1 Theory of Operation . . . . . . . . 187.2 ServiceManager . . . . . . . . . . 187.3 Abstract Factories . . . . . . . . . 187.4 Plugin Managers . . . . . . . . . . 187.5 ViewManager . . . . . . . . . . . . 187.6 Application Configuration Options 187.7 Default Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847 847 847 852 854 855 856 857 . . . . . . . . . . . . . . 188Routing 861 188.1 Router Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863 188.2 HTTP Route Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863 188.3 HTTP Routing Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869 xviii
  • 21. 188.4 Console Route Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 871 189The MvcEvent 189.1 Order of events . . . . . . . . . . . . . . . 189.2 MvcEvent::EVENT_BOOTSTRAP . . . . 189.3 MvcEvent::EVENT_ROUTE . . . . . . . 189.4 MvcEvent::EVENT_DISPATCH . . . . . 189.5 MvcEvent::EVENT_DISPATCH_ERROR 189.6 MvcEvent::EVENT_RENDER . . . . . . 189.7 MvcEvent::EVENT_RENDER_ERROR . 189.8 MvcEvent::EVENT_FINISH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873 874 874 875 876 877 879 879 880 190The SendResponseEvent 883 190.1 Listeners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883 190.2 Triggerers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884 191Available Controllers 885 191.1 Common Interfaces Used With Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885 191.2 The AbstractActionController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887 191.3 The AbstractRestfulController . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888 192Controller Plugins 192.1 AcceptableViewModelSelector Plugin 192.2 FlashMessenger Plugin . . . . . . . . 192.3 Forward Plugin . . . . . . . . . . . . 192.4 Identity Plugin . . . . . . . . . . . . 192.5 Layout Plugin . . . . . . . . . . . . 192.6 Params Plugin . . . . . . . . . . . . 192.7 Post/Redirect/Get Plugin . . . . . . . 192.8 File Post/Redirect/Get Plugin . . . . 192.9 Redirect Plugin . . . . . . . . . . . . 192.10Url Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 891 891 892 894 894 895 895 896 896 898 898 193Examples 899 193.1 Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899 193.2 Bootstrapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900 194Introduction to ZendNavigation 903 194.1 Pages and Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903 194.2 View Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904 195Quick Start 905 196Pages 907 197Common page features 909 198ZendNavigationPageMvc 913 199ZendNavigationPageUri 917 200Creating custom page types 919 201Creating pages using the page factory 921 xix
  • 22. 202Containers 202.1 Creating containers 202.2 Adding pages . . . 202.3 Removing pages . 202.4 Finding pages . . . 202.5 Iterating containers 202.6 Other operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923 923 929 930 931 933 934 203View Helpers 203.1 Introduction . . . . . . . . . . . . 203.2 Translation of labels and titles . . . 203.3 Integration with ACL . . . . . . . . 203.4 Navigation setup used in examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 937 937 938 939 939 204View Helper - Breadcrumbs 204.1 Introduction . . . . . . . . . . . . . 204.2 Basic usage . . . . . . . . . . . . . . 204.3 Specifying indentation . . . . . . . . 204.4 Customize output . . . . . . . . . . . 204.5 Rendering using a partial view script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 945 945 945 946 946 947 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205View Helper - Links 949 205.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949 205.2 Basic usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951 206View Helper - Menu 206.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206.2 Basic usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206.3 Calling renderMenu() directly . . . . . . . . . . . . . . . . . . . . . . 206.4 Rendering the deepest active menu . . . . . . . . . . . . . . . . . . . 206.5 Rendering with maximum depth . . . . . . . . . . . . . . . . . . . . . 206.6 Rendering with minimum depth . . . . . . . . . . . . . . . . . . . . . 206.7 Rendering only the active branch . . . . . . . . . . . . . . . . . . . . 206.8 Rendering only the active branch with minimum depth . . . . . . . . . 206.9 Rendering only the active branch with maximum depth . . . . . . . . . 206.10Rendering only the active branch with maximum depth and no parents . 206.11Rendering a custom menu using a partial view script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 955 955 956 957 958 958 959 960 961 961 962 962 207View Helper - Sitemap 207.1 Introduction . . . . . . . . . . . . 207.2 Basic usage . . . . . . . . . . . . . 207.3 Rendering using no ACL role . . . 207.4 Rendering using a maximum depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965 965 966 967 968 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208View Helper - Navigation Proxy 971 208.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971 208.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 971 209Introduction to ZendPaginator 973 210Usage 210.1 Paginating data collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210.2 The DbSelect adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210.3 Rendering pages with view scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975 975 976 977 xx
  • 23. 211Configuration 983 212Advanced usage 212.1 Custom data source adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.2 Custom scrolling styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.3 Caching features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985 985 985 986 213Introduction to ZendPermissionsAcl 213.1 Resources . . . . . . . . . . . . . 213.2 Roles . . . . . . . . . . . . . . . 213.3 Creating the Access Control List . 213.4 Registering Roles . . . . . . . . . 213.5 Defining Access Controls . . . . 213.6 Querying an ACL . . . . . . . . 989 989 990 991 991 992 993 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214Refining Access Controls 995 214.1 Precise Access Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995 214.2 Removing Access Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997 215Advanced Usage 999 215.1 Storing ACL Data for Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 999 215.2 Writing Conditional ACL Rules with Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 999 216Introduction to ZendPermissionsRbac 1001 216.1 Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001 216.2 Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001 216.3 Dynamic Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001 217Methods 1003 218Examples 218.1 Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218.2 Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218.3 Dynamic Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005 . 1005 . 1006 . 1006 219Progress Bars 219.1 Introduction . . . 219.2 Basic Usage . . . 219.3 Persistent Progress 219.4 Standard Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220File Upload Handlers 220.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220.2 Methods of Reporting Progress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220.3 Standard Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1009 1009 1009 1009 1010 1013 . 1013 . 1013 . 1014 221Introduction to ZendSerializer 1017 221.1 Quick Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017 221.2 Basic configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018 221.3 Available Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018 222ZendSerializerAdapter 222.1 The PhpSerialize Adapter 222.2 The IgBinary Adapter . . 222.3 The Wddx Adapter . . . . 222.4 The Json Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1021 1021 1021 1021 1022 xxi
  • 24. 222.5 The PythonPickle Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1022 222.6 The PhpCode Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1023 223Introduction to ZendServer 1025 224ZendServerReflection 1027 224.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027 224.2 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027 225ZendServiceManager 1029 226ZendServiceManager Quick Start 1033 226.1 Using Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033 226.2 Modules as Service Providers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034 226.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034 227Delegator service factories 1039 227.1 Delegator factory signature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039 227.2 A Delegator factory use case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039 228Lazy Services 228.1 Use cases . . . . . 228.2 Setup . . . . . . . 228.3 Practical example . 228.4 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1043 1043 1043 1043 1045 229Session Config 1047 229.1 Standard Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047 229.2 Session Config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1048 229.3 Custom Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049 230Session Container 1051 230.1 Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1051 230.2 Setting the Default Session Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1051 231Session Manager 1053 231.1 Initializing the Session Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1053 231.2 Session Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1055 232Session Save Handlers 232.1 Cache . . . . . . . . . 232.2 DbTableGateway . . . 232.3 MongoDB . . . . . . 232.4 Custom Save Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057 1057 1057 1058 1059 233Session Storage 233.1 Array Storage . . . . . 233.2 Session Storage . . . . 233.3 Session Array Storage 233.4 Custom Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061 1061 1061 1062 1062 234Session Validators 1063 234.1 Http User Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 234.2 Remote Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 234.3 Custom Validators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064 xxii
  • 25. 235ZendSoapServer 235.1 ZendSoapServer constructor . . . . . 235.2 Methods to define Web Service API . . 235.3 Request and response objects handling 235.4 Document/Literal WSDL Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065 1065 1066 1067 1069 236ZendSoapClient 1071 236.1 ZendSoapClient Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1071 236.2 Performing SOAP Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1072 237WSDL Accessor 237.1 ZendSoapWsdl constructor . . 237.2 addMessage() method . . . . . 237.3 addPortType() method . . . . . 237.4 addPortOperation() method . . 237.5 addBinding() method . . . . . . 237.6 addBindingOperation() method 237.7 addSoapBinding() method . . . 237.8 addSoapOperation() method . . 237.9 addService() method . . . . . . 237.10Type mapping . . . . . . . . . 237.11addDocumentation() method . . 237.12Get finalized WSDL document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1075 1075 1075 1076 1076 1076 1077 1077 1077 1077 1078 1079 1080 238AutoDiscovery 238.1 AutoDiscovery Introduction 238.2 Class autodiscovering . . . 238.3 Functions autodiscovering . 238.4 Autodiscovering Datatypes . 238.5 WSDL Binding Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1081 1081 1082 1083 1083 1083 . . . . . . . . . . 239ZendStdlibHydrator 239.1 HydratorInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239.2 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239.3 Available Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085 . 1085 . 1085 . 1086 240ZendStdlibHydratorFilter 240.1 Filter implementations . . . . . . . . 240.2 Remove filters . . . . . . . . . . . . 240.3 Add filters . . . . . . . . . . . . . . 240.4 Use the composite for complex filters 240.5 Using the provider interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1087 1087 1088 1088 1089 1090 241ZendStdlibHydratorStrategy 1093 241.1 Adding strategies to the hydrators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1093 241.2 Available implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094 241.3 Writing custom strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1095 242ZendStdlibHydratorAggregateAggregateHydrator 1097 242.1 Installation requirements for the AggregateHydrator . . . . . . . . . . . . . . . . . . . . . . . . . . 1097 242.2 Example of AggregateHydrator usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1097 242.3 Advanced use cases of the AggregateHydrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1098 243Introduction to ZendTag 1101 xxiii