zend framework 1 10 x en

Programmer's
Reference
Guide

Zend Framework 1.10.x

Programmer's Reference Guide: Zend Framework 1.10.x
Publication date 01/27/2010 by mikaelkael (SVN 20684)
Copyright © 2005-2010 Zend Technologies Inc. (http://www.zend.com)

Table of Contents
I. Introduction to Zend Framework .................................................................................... 1
Overview ................................................................................................................. 3
Installation ............................................................................................................... 4
II. Learning Zend Framework ........................................................................................... 5
Zend Framework Quick Start .................................................................................... 8
1. Zend Framework & MVC Introduction ........................................................... 8
1.1. Zend Framework ............................................................................... 8
1.2. Model-View-Controller ....................................................................... 8
2. Create Your Project ................................................................................... 10
2.1. Install Zend Framework ................................................................... 10

2.2. Create Your Project ......................................................................... 10
2.3. The Bootstrap ................................................................................. 11
2.4. Configuration ................................................................................... 12
2.5. Action Controllers ............................................................................ 12
2.6. Views ............................................................................................. 13
2.7. Checkpoint ...................................................................................... 15
3. Create A Layout ........................................................................................ 15
4. Create a Model and Database Table ........................................................... 18
5. Create A Form ........................................................................................... 28
6. Congratulations! ......................................................................................... 31
Autoloading in Zend Framework ............................................................................. 33
1. Introduction ................................................................................................ 33
2. Goals and Design ...................................................................................... 33
2.1. Class Naming Conventions .............................................................. 33
2.2. Autoloader Conventions and Design ................................................. 33
3. Basic Autoloader Usage ............................................................................. 34
4. Resource Autoloading ................................................................................ 36
5. Conclusion ................................................................................................. 37
Plugins in Zend Framework .................................................................................... 38
1. Introduction ................................................................................................ 38

2. Using Plugins ............................................................................................ 38
3. Conclusion ................................................................................................. 40
Getting Started with Zend_Layout ........................................................................... 42
1. Introduction ................................................................................................ 42
2. Using Zend_Layout .................................................................................... 42
2.1. Layout Configuration ....................................................................... 42
2.2. Create a Layout Script ..................................................................... 43
2.3. Accessing the Layout Object ............................................................ 43
2.4. Other Operations ............................................................................. 44
3. Zend_Layout: Conclusions .......................................................................... 45
Getting Started Zend_View Placeholders ................................................................. 46
1. Introduction ................................................................................................ 46
2. Basic Placeholder Usage ............................................................................ 46
3. Standard Placeholders ............................................................................... 49
3.1. Setting the DocType ........................................................................ 49
3.2. Specifying the Page Title ................................................................. 50
3.3. Specifying Stylesheets with HeadLink ............................................... 51
3.4. Aggregating Scripts Using HeadScript .............................................. 52
4. View Placeholders: Conclusion ................................................................... 54
Understanding and Using Zend Form Decorators ..................................................... 55

1. Introduction ................................................................................................ 55

iii

Programmer's Reference Guide

2. Decorator Basics ....................................................................................... 55
2.1. Overview of the Decorator Pattern .................................................... 55
2.2. Creating Your First Decorator .......................................................... 57
3. Layering Decorators ................................................................................... 58
4. Rendering Individual Decorators ................................................................. 62
5. Creating and Rendering Composite Elements .............................................. 66
5.1. The Element ................................................................................... 66
5.2. The Decorator ................................................................................. 68
5.3. Conclusion ...................................................................................... 70
6. Conclusion ................................................................................................. 70
Getting Started with Zend_Session, Zend_Auth, and Zend_Acl ................................. 72
1. Building Multi-User Applications With Zend Framework ................................. 72
1.1. Zend Framework ............................................................................. 72
2. Managing User Sessions In ZF ................................................................... 72

2.1. Introduction to Sessions .................................................................. 72
2.2. Basic Usage of Zend_Session ......................................................... 73
2.3. Advanced Usage of Zend_Session ................................................... 74
3. Authenticating Users in Zend Framework .................................................... 74
3.1. Introduction to Authentication ........................................................... 74
3.2. Basic Usage of Zend_Auth .............................................................. 74
4. Building an Authorization System in Zend Framework ................................... 76
4.1. Introduction to Authorization ............................................................. 76
4.2. Basic Usage of Zend_Acl ................................................................ 77
Getting Started with Zend_Search_Lucene .............................................................. 80
1. Zend_Search_Lucene Introduction .............................................................. 80
2. Lucene Index Structure .............................................................................. 81
3. Index Opening and Creation ....................................................................... 82
4. Indexing .................................................................................................... 82
4.1. Indexing Policy ................................................................................ 82
5. Searching .................................................................................................. 83
6. Supported queries ...................................................................................... 84
7. Search result pagination ............................................................................. 86
Getting Started with Zend_Paginator ....................................................................... 88
1. Introduction ................................................................................................ 88

2. Simple Examples ....................................................................................... 88
3. Pagination Control and ScrollingStyles ........................................................ 90
4. Putting it all Together ................................................................................. 91
III. Zend Framework Reference ...................................................................................... 93
Zend_Acl ............................................................................................................. 124
1. Introduction .............................................................................................. 124
1.1. Resources ..................................................................................... 124
1.2. Roles ............................................................................................ 124
1.3. Creating the Access Control List .................................................... 125
1.4. Registering Roles .......................................................................... 126
1.5. Defining Access Controls ............................................................... 127
1.6. Querying an ACL .......................................................................... 127
2. Refining Access Controls .......................................................................... 128
2.1. Precise Access Controls ................................................................ 128
2.2. Removing Access Controls ............................................................ 130
3. Advanced Usage ...................................................................................... 130
3.1. Storing ACL Data for Persistence ................................................... 130
3.2. Writing Conditional ACL Rules with Assertions ................................ 131
Zend_Amf ............................................................................................................ 132
1. Introduction .............................................................................................. 132


iv

Programmer's Reference Guide

2. Zend_Amf_Server ....................................................................................
2.1. Connecting to the Server from Flex ................................................
2.2. Error Handling ...............................................................................
2.3. AMF Responses ............................................................................
2.4. Typed Objects ...............................................................................
2.5. Resources .....................................................................................
2.6. Connecting to the Server from Flash ...............................................
2.7. Authentication ...............................................................................
Zend_Application ..................................................................................................
1. Introduction ..............................................................................................
2. Zend_Application Quick Start ....................................................................
2.1. Using Zend_Tool ...........................................................................
2.2. Adding Zend_Application to your application ....................................
2.3. Adding and creating resources .......................................................
2.4. Next steps with Zend_Application ...................................................

3. Theory of Operation .................................................................................
3.1. Bootstrapping ................................................................................
3.2. Resource Plugins ..........................................................................
4. Examples .................................................................................................
5. Core Functionality ....................................................................................
5.1. Zend_Application ...........................................................................
5.2. Zend_Application_Bootstrap_Bootstrapper ......................................
5.3. Zend_Application_Bootstrap_ResourceBootstrapper ........................
5.4. Zend_Application_Bootstrap_BootstrapAbstract ...............................
5.5. Zend_Application_Bootstrap_Bootstrap ...........................................
5.6. Zend_Application_Resource_Resource ...........................................
5.7. Zend_Application_Resource_ResourceAbstract ...............................
6. Available Resource Plugins ......................................................................
6.1. Zend_Application_Resource_Cachemanager ...................................
6.2. Zend_Application_Resource_Db .....................................................
6.3. Zend_Application_Resource_Frontcontroller ....................................
6.4. Zend_Application_Resource_Layout ...............................................
6.5. Zend_Application_Resource_Locale ...............................................
6.6. Zend_Application_Resource_Log ....................................................
6.7. Zend_Application_Resource_Mail ...................................................

6.8. Zend_Application_Resource_Modules .............................................
6.9. Zend_Application_Resource_Multidb ...............................................
6.10. Zend_Application_Resource_Navigation ........................................
6.11. Zend_Application_Resource_Router .............................................
6.12. Zend_Application_Resource_Session ............................................
6.13. Zend_Application_Resource_View ................................................
Zend_Auth ...........................................................................................................
1. Introduction ..............................................................................................
1.1. Adapters .......................................................................................
1.2. Results .........................................................................................
1.3. Identity Persistence .......................................................................
1.4. Usage ...........................................................................................
2. Database Table Authentication ..................................................................
2.1. Introduction ...................................................................................
2.2. Advanced Usage: Persisting a DbTable Result Object ......................
2.3. Advanced Usage By Example ........................................................
3. Digest Authentication ................................................................................
3.1. Introduction ...................................................................................
3.2. Specifics .......................................................................................


v

132
134
136
136
136
138
138
140
142
142
142
142
144
145
147
147
148
152

153
156
156
159
160
161
164
165
166
168
168
168
169
170
170
171
172
172
174
175

175
176
176
178
178
178
179
180
183
184
184
186
186
188
188
188

Programmer's Reference Guide

3.3. Identity ..........................................................................................
4. HTTP Authentication Adapter ....................................................................
4.1. Introduction ...................................................................................
4.2. Design Overview ...........................................................................
4.3. Configuration Options ....................................................................
4.4. Resolvers ......................................................................................
4.5. Basic Usage .................................................................................
5. LDAP Authentication ................................................................................
5.1. Introduction ...................................................................................
5.2. Usage ...........................................................................................
5.3. The API ........................................................................................
5.4. Server Options ..............................................................................
5.5. Collecting Debugging Messages .....................................................
5.6. Common Options for Specific Servers .............................................
6. Open ID Authentication ............................................................................
6.1. Introduction ...................................................................................
6.2. Specifics .......................................................................................
Zend_Barcode .....................................................................................................
1. Introduction ..............................................................................................
2. Barcode creation using Zend_Barcode class ..............................................
2.1. Using Zend_Barcode::factory .........................................................
2.2. Drawing a barcode ........................................................................
2.3. Renderering a barcode ..................................................................
3. Zend_Barcode Objects .............................................................................
3.1. Common Options ..........................................................................
3.2. Common Additional Getters ...........................................................
3.3. Description of shipped barcodes .....................................................
4. Zend_Barcode Renderers .........................................................................
4.1. Common Options ..........................................................................
4.2. Zend_Barcode_Renderer_Image ....................................................
4.3. Zend_Barcode_Renderer_Pdf ........................................................
Zend_Cache ........................................................................................................
1. Introduction ..............................................................................................
2. The Theory of Caching .............................................................................
2.1. The Zend_Cache Factory Method ...................................................
2.2. Tagging Records ...........................................................................
2.3. Cleaning the Cache .......................................................................
3. Zend_Cache Frontends ............................................................................
3.1. Zend_Cache_Core .........................................................................
3.2. Zend_Cache_Frontend_Output .......................................................
3.3. Zend_Cache_Frontend_Function ....................................................
3.4. Zend_Cache_Frontend_Class ........................................................
3.5. Zend_Cache_Frontend_File ...........................................................
3.6. Zend_Cache_Frontend_Page .........................................................
4. Zend_Cache Backends .............................................................................
4.1. Zend_Cache_Backend_File ............................................................
4.2. Zend_Cache_Backend_Sqlite .........................................................
4.3. Zend_Cache_Backend_Memcached ...............................................
4.4. Zend_Cache_Backend_Apc ...........................................................
4.5. Zend_Cache_Backend_Xcache ......................................................
4.6. Zend_Cache_Backend_ZendPlatform .............................................
4.7. Zend_Cache_Backend_TwoLevels .................................................
4.8. Zend_Cache_Backend_ZendServer_Disk and
Zend_Cache_Backend_ZendServer_ShMem .........................................

vi

188
189
189
189
189
190
191
192
192
192
193
195
198
199
200
200
201
203
203
203
203
204
204
205
206
208
208
215
215
216
217
218
218
220
221
221
222
222
222
226
226
227
229
229
234
234
235
236
237
237
237
238
239

Programmer's Reference Guide

5. The Cache Manager ................................................................................
Zend_Captcha .....................................................................................................
1. Introduction ..............................................................................................
2. Captcha Operation ...................................................................................
3. CAPTCHA Adapters .................................................................................
3.1. Zend_Captcha_Word .....................................................................
3.2. Zend_Captcha_Dumb ....................................................................
3.3. Zend_Captcha_Figlet .....................................................................
3.4. Zend_Captcha_Image ....................................................................
3.5. Zend_Captcha_ReCaptcha ............................................................
Zend_CodeGenerator ...........................................................................................
1. Introduction ..............................................................................................
1.1. Theory of Operation ......................................................................
2. Zend_CodeGenerator Examples ...............................................................
3. Zend_CodeGenerator Reference ...............................................................
3.1. Abstract Classes and Interfaces .....................................................
3.2. Concrete CodeGenerator Classes ..................................................
Zend_Config ........................................................................................................
1. Introduction ..............................................................................................
2. Theory of Operation .................................................................................
3. Zend_Config_Ini .......................................................................................
4. Zend_Config_Xml .....................................................................................
Zend_Config_Writer ..............................................................................................
1. Zend_Config_Writer ..................................................................................
Zend_Console_Getopt ..........................................................................................
1. Introduction ..............................................................................................
2. Declaring Getopt Rules ............................................................................
2.1. Declaring Options with the Short Syntax .........................................
2.2. Declaring Options with the Long Syntax ..........................................
3. Fetching Options and Arguments ..............................................................
3.1. Handling Getopt Exceptions ...........................................................
3.2. Fetching Options by Name .............................................................
3.3. Reporting Options .........................................................................
3.4. Fetching Non-option Arguments .....................................................
4. Configuring Zend_Console_Getopt ............................................................
4.1. Adding Option Rules ......................................................................
4.2. Adding Help Messages ..................................................................
4.3. Adding Option Aliases ...................................................................
4.4. Adding Argument Lists ...................................................................
4.5. Adding Configuration .....................................................................
Zend_Controller ...................................................................................................
1. Zend_Controller Quick Start ......................................................................
1.1. Introduction ...................................................................................
1.2. Quick Start ....................................................................................
2. Zend_Controller Basics .............................................................................
3. The Front Controller .................................................................................
3.1. Overview .......................................................................................
3.2. Primary Methods ...........................................................................
3.3. Environmental Accessor Methods ...................................................
3.4. Front Controller Parameters ...........................................................
3.5. Extending the Front Controller ........................................................
4. The Request Object .................................................................................
4.1. Introduction ...................................................................................
4.2. HTTP Requests .............................................................................

vii

239
243
243
243
244
244
245
245
245
246
247
247
247
249
253
253
255
261
261
262
263
265
270
270
273
273
274
274
274
275
275
276
276
277
277
277
277
278
278
279
281
281
281
281
284
287
287
288
289
291
291
292
292
292

Programmer's Reference Guide

4.3. Subclassing the Request Object .....................................................
5. The Standard Router ................................................................................
5.1. Introduction ...................................................................................
5.2. Using a Router ..............................................................................
5.3. Basic Rewrite Router Operation .....................................................
5.4. Default Routes ..............................................................................
5.5. Base URL and Subdirectories ........................................................
5.6. Global Parameters .........................................................................
5.7. Route Types .................................................................................
5.8. Using Zend_Config with the RewriteRouter .....................................
5.9. Subclassing the Router ..................................................................
6. The Dispatcher ........................................................................................
6.1. Overview .......................................................................................
6.2. Subclassing the Dispatcher ............................................................
7. Action Controllers .....................................................................................
7.1. Introduction ...................................................................................
7.2. Object Initialization ........................................................................
7.3. Pre- and Post-Dispatch Hooks .......................................................
7.4. Accessors .....................................................................................
7.5. View Integration ............................................................................
7.6. Utility Methods ..............................................................................
7.7. Subclassing the Action Controller ...................................................
8. Action Helpers .........................................................................................
8.1. Introduction ...................................................................................
8.2. Helper Initialization ........................................................................
8.3. The Helper Broker .........................................................................
8.4. Built-in Action Helpers ...................................................................
8.5. Writing Your Own Helpers ..............................................................
9. The Response Object ...............................................................................
9.1. Usage ...........................................................................................
9.2. Manipulating Headers ....................................................................
9.3. Named Segments ..........................................................................
9.4. Testing for Exceptions in the Response Object ................................
9.5. Subclassing the Response Object ..................................................
10. Plugins ..................................................................................................
10.1. Introduction .................................................................................
10.2. Writing Plugins ............................................................................
10.3. Using Plugins ..............................................................................
10.4. Retrieving and Manipulating Plugins .............................................
10.5. Plugins Included in the Standard Distribution .................................
11. Using a Conventional Modular Directory Structure ....................................
11.1. Introduction .................................................................................
11.2. Specifying Module Controller Directories .......................................
11.3. Routing to Modules ......................................................................
11.4. Module or Global Default Controller ..............................................
12. MVC Exceptions .....................................................................................
12.1. Introduction .................................................................................
12.2. Handling Exceptions ....................................................................
12.3. MVC Exceptions You May Encounter ............................................
Zend_Currency ....................................................................................................
1. Introduction to Zend_Currency ..................................................................
1.1. Why should you use Zend_Currency? .............................................
2. Using Zend_Currency ...............................................................................
2.1. Generic usage ...............................................................................

viii

295
297
297
298
298
300
301
301
301
314
315
315
315
317
320
320
321
321
322
323
324
325
327
327
327
328
329
357
357
357
359
360
361
362
362
362
362
363
364
364
369
369
370
371
371
371
371
372
373
376
376
376
376
376

Programmer's Reference Guide

2.2. Currency creation based on a locale ...............................................
Options for currencies ..............................................................................
What makes a currency? ..........................................................................
Where is the currency? ............................................................................
How does the currency look like? ..............................................................
How much is my currency? ......................................................................
7.1. Working with currency values .........................................................
7.2. Using precision on currencies ........................................................
8. Calculating with currencies .......................................................................
9. Exchanging currencies .............................................................................
10. Additional informations on Zend_Currency ...............................................
10.1. Currency informations ..................................................................
10.2. Currency Performance Optimization ..............................................
Zend_Date ...........................................................................................................
1. Introduction ..............................................................................................
1.1. Always Set a Default Timezone ......................................................
1.2. Why Use Zend_Date? ...................................................................
2. Theory of Operation .................................................................................
2.1. Internals ........................................................................................
3. Basic Methods .........................................................................................
3.1. Current Date .................................................................................
3.2. Zend_Date by Example .................................................................
4. Zend_Date API Overview .........................................................................
4.1. Zend_Date Options .......................................................................
4.2. Working with Date Values ..............................................................
4.3. Basic Zend_Date Operations Common to Many Date Parts ..............
4.4. Comparing Dates ..........................................................................
4.5. Getting Dates and Date Parts ........................................................
4.6. Working with Fractions of Seconds .................................................
4.7. Sunrise / Sunset ............................................................................
5. Creation of Dates .....................................................................................
5.1. Create the Actual Date ..................................................................
5.2. Create a Date from Database ........................................................
5.3. Create Dates from an Array ...........................................................
6. Constants for General Date Functions .......................................................
6.1. Using Constants ............................................................................
6.2. List of All Constants ......................................................................
6.3. Self-Defined OUTPUT Formats with ISO .........................................
6.4. Self-Defined OUTPUT Formats Using PHP's date() Format
Specifiers .............................................................................................
7. Working Examples ...................................................................................
7.1. Checking Dates .............................................................................
7.2. Sunrise and Sunset .......................................................................
7.3. Time Zones ...................................................................................
Zend_Db ..............................................................................................................
1. Zend_Db_Adapter ....................................................................................
1.1. Connecting to a Database Using an Adapter ...................................
1.2. Example Database ........................................................................
1.3. Reading Query Results ..................................................................
1.4. Writing Changes to the Database ...................................................
1.5. Quoting Values and Identifiers ........................................................
1.6. Controlling Database Transactions .................................................
1.7. Listing and Describing Tables ........................................................
1.8. Closing a Connection ....................................................................
3.
4.
5.
6.
7.

ix

377
377
378
380
381
382
383
383
384
385
386
386
387
388
388
388
388
389
389
390
390
390
392
392
393
394
397
399
400
400
401
401
401
402
402
402
403
407
410
413
413
414
416
419
419
419
424
425
428
432
434
435
436

Programmer's Reference Guide

2.

3.

4.

5.

6.

7.

8.

9.

1.9. Running Other Database Statements ..............................................
1.10. Retrieving Server Version .............................................................
1.11. Notes on Specific Adapters ..........................................................
Zend_Db_Statement .................................................................................
2.1. Creating a Statement .....................................................................
2.2. Executing a Statement ...................................................................
2.3. Fetching Results from a SELECT Statement ...................................
Zend_Db_Profiler .....................................................................................
3.1. Introduction ...................................................................................
3.2. Using the Profiler ..........................................................................
3.3. Advanced Profiler Usage ...............................................................
3.4. Specialized Profilers ......................................................................
Zend_Db_Select .......................................................................................
4.1. Introduction ...................................................................................
4.2. Creating a Select Object ................................................................
4.3. Building Select queries ..................................................................
4.4. Executing Select Queries ...............................................................
4.5. Other methods ..............................................................................
Zend_Db_Table .......................................................................................
5.1. Introduction ...................................................................................
5.2. Using Zend_Db_Table as a concrete class ......................................
5.3. Defining a Table Class ..................................................................
5.4. Creating an Instance of a Table .....................................................
5.5. Inserting Rows to a Table ..............................................................
5.6. Updating Rows in a Table ..............................................................
5.7. Deleting Rows from a Table ...........................................................
5.8. Finding Rows by Primary Key ........................................................
5.9. Querying for a Set of Rows ............................................................
5.10. Querying for a Single Row ...........................................................
5.11. Retrieving Table Metadata Information ..........................................
5.12. Caching Table Metadata ..............................................................
5.13. Customizing and Extending a Table Class .....................................
Zend_Db_Table_Row ...............................................................................
6.1. Introduction ...................................................................................
6.2. Fetching a Row .............................................................................
6.3. Writing rows to the database ..........................................................
6.4. Serializing and unserializing rows ...................................................
6.5. Extending the Row class ...............................................................
Zend_Db_Table_Rowset ...........................................................................
7.1. Introduction ...................................................................................
7.2. Fetching a Rowset ........................................................................
7.3. Retrieving Rows from a Rowset .....................................................
7.4. Retrieving a Rowset as an Array ....................................................
7.5. Serializing and Unserializing a Rowset ............................................
7.6. Extending the Rowset class ...........................................................
Zend_Db_Table Relationships ...................................................................
8.1. Introduction ...................................................................................
8.2. Defining Relationships ...................................................................
8.3. Fetching a Dependent Rowset .......................................................
8.4. Fetching a Parent Row ..................................................................
8.5. Fetching a Rowset via a Many-to-many Relationship ........................
8.6. Cascading Write Operations ...........................................................
Zend_Db_Table_Definition ........................................................................
9.1. Introduction ...................................................................................

x

437
438
438
441
441
442
442
444
444
446
447
448
449
449
450
450
463
464
466
466
466
466
469
471
473
473
474
475
479
479
480
482
485
485
485
487
489
490
493
493
493
493
495
496
497
498
498
498
500
502
503
505
507
507

Programmer's Reference Guide

9.2. Basic Usage .................................................................................
9.3. Advanced Usage ...........................................................................
Zend_Debug ........................................................................................................
1. Dumping Variables ...................................................................................
Zend_Dojo ...........................................................................................................
1. Introduction ..............................................................................................
2. Zend_Dojo_Data: dojo.data Envelopes ......................................................
2.1. Zend_Dojo_Data Usage .................................................................
2.2. Adding metadata to your containers ................................................
2.3. Advanced Use Cases ....................................................................
3. Dojo View Helpers ...................................................................................
3.1. dojo() View Helper .........................................................................
3.2. Dijit-Specific View Helpers .............................................................
4. Dojo Form Elements and Decorators .........................................................
4.1. Dijit-Specific Form Decorators ........................................................
4.2. Dijit-Specific Form Elements ...........................................................
4.3. Dojo Form Examples .....................................................................
5. Zend_Dojo build layer support ..................................................................
5.1. Introduction ...................................................................................
5.2. Generating Custom Module Layers with Zend_Dojo_BuildLayer ........
5.3. Generating Build Profiles with Zend_Dojo_BuildLayer ......................
Zend_Dom ...........................................................................................................
1. Introduction ..............................................................................................
2. Zend_Dom_Query ....................................................................................
2.1. Theory of Operation ......................................................................
2.2. Methods Available .........................................................................
Zend_Exception ...................................................................................................
1. Using Exceptions .....................................................................................
2. Basic usage .............................................................................................
3. Previous Exceptions .................................................................................
Zend_Feed ..........................................................................................................
1. Introduction ..............................................................................................
2. Importing Feeds .......................................................................................
2.1. Custom feeds ................................................................................
3. Retrieving Feeds from Web Pages ............................................................
4. Consuming an RSS Feed .........................................................................
5. Consuming an Atom Feed ........................................................................
6. Consuming a Single Atom Entry ...............................................................
7. Modifying Feed and Entry structures .........................................................
8. Custom Feed and Entry Classes ...............................................................
9. Zend_Feed_Reader ..................................................................................
9.1. Introduction ...................................................................................
9.2. Importing Feeds ............................................................................
9.3. Retrieving Underlying Feed and Entry Sources ................................
9.4. Cache Support and Intelligent Requests .........................................
9.5. Locating Feed URIs from Websites .................................................
9.6. Attribute Collections .......................................................................
9.7. Retrieving Feed Information ...........................................................
9.8. Retrieving Entry/Item Information ....................................................
9.9. Extending Feed and Entry APIs ......................................................
10. Zend_Feed_Writer ..................................................................................
10.1. Introduction .................................................................................
10.2. Architecture .................................................................................
10.3. Getting Started ............................................................................

xi

507
509
511
511
512
512
512
512
514
514
516
516
521
534
535
537
554
555
555
556
558
561
561
561
561
562
564
564
564
564
566
566
567
567
571
572
573
574
575
575
577
577
577
578
579
580
581
582
585
588
592
592
592
593

Programmer's Reference Guide

10.4. Setting Feed Data Points .............................................................
10.5. Setting Entry Data Points .............................................................
11. Zend_Feed_Pubsubhubbub ..................................................