Programmer's Reference Guide

Zend Framework

03/02/2012


Table of Contents

I. Introduction to Zend Framework
1. Overview
2. Installation
II. Learning Zend Framework
Learning Dependency Injection
1. Very brief introduction to Di.
2. Very brief introduction to Di Container.
3. Simplest usage case (2 classes, one consumes the other)
4. Simplest Usage Case Without Type-hints
5. Simplest usage case with Compiled Definition
6. Creating a precompiled definition for others to use
7. Using Multiple Definitions From Multiple Sources
8. Generating Service Locators
III. Zend Framework Reference
3. Zend\Cache
3.1. Zend\Cache\Storage\Adapter
3.1.1. Overview
3.1.2. Quick Start
3.1.3. Configuration Options
3.1.4. Available Methods
3.1.5. TODO: Examples
3.2. Zend\Cache\Storage\Plugin
3.2.1. Overview
3.2.2. Quick Start
3.2.3. Configuration Options
3.2.4. Available Methods
3.2.5. TODO: Examples
3.3. Zend\Cache\Storage\Capabilities
3.3.1. Overview
3.3.2. Available Methods
3.3.3. Examples
3.4. Zend\Cache\Pattern
3.4.1. Overview
3.4.2. Quick Start
3.4.3. Configuration Options
3.4.4. Available Methods
3.4.5. Examples
3.5. Zend\Cache\Utils
3.5.1. Overview
3.5.2. Available Methods
3.5.3. Examples
4. Zend_Config
4.1. Introduction
4.2. Theory of Operation
4.3. Zend\Config\Reader
4.3.1. Zend\Config\Reader\Ini
4.3.2. Zend\Config\Reader\Xml
4.4. Zend\Config\Writer
4.4.1. Zend\Config\Writer\Ini
4.4.2. Zend\Config\Writer\Xml
4.4.3. Zend\Config\Writer\PhpArray
4.5. Zend\Config\Processor
4.5.1. Zend\Config\Processor\Constant
4.5.2. Zend\Config\Processor\Filter
4.5.3. Zend\Config\Processor\Queue
4.5.4. Zend\Config\Processor\Token
4.5.5. Zend\Config\Processor\Translator
5. Zend_Db
5.1. Zend\Db\Adapter
5.1.1. Creating an Adapter (Quickstart)
5.1.2. Creating an Adapter (By Injecting Dependencies)
5.1.3. Query Preparation Through Zend\Db\Adapter\Adapter::query()
5.1.4. Query Execution Through Zend\Db\Adapter\Adapter::query()
5.1.5. Creating Statements
5.1.6. Using The Platform Object
5.1.7. Using The Parameter Container
5.1.8. Examples
5.2. Zend\Db\Sql
5.2.1. Primary Objects: Select, Insert, Update, Delete, Where
5.2.2. Where, Predicates and the Fluent Interface
5.2.3. Examples
5.2.3.1. Complex Where
5.2.3.2. Select Prepare
5.3. Zend\Db\TableGateway
5.3.1. Examples
5.3.1.1. Selecting Rows
5.3.1.2. Inserting Rows
5.3.1.3. Updating Rows
5.3.1.4. Deleting Rows
5.3.1.5. Using a Fluent Where With Select
5.3.1.6. Using a Closure With Select
5.3.1.7. Row Gateway Integration
6. Zend\Di
6.1. Introduction to Zend\Di
6.1.1. Dependency Injection
6.1.2. Dependency Injection Containers
6.2. Zend\Di Quickstart
6.3. Zend\Di Definition
6.3.1. DefinitionList
6.3.2. RuntimeDefinition
6.3.3. CompilerDefinition
6.3.4. ClassDefinition
6.4. Zend\Di InstanceManager
6.4.1. Parameters
6.4.2. Preferences
6.4.3. Aliases
6.5. Zend\Di Configuration
6.6. Zend\Di Debugging & Complex Use Cases
6.6.1. Debugging a DiC
6.6.2. Complex Use Cases
6.6.2.1. Interface Injection
6.6.2.2. Setter Injection with Class Definition
6.6.2.3. Multiple Injections To A Single Injection Point
7. Zend\EventManager
7.1. The EventManager
7.1.1. Overview
7.1.2. Quick Start
7.1.3. Configuration Options
7.1.4. Available Methods
7.1.5. Examples
8. Zend_Http
8.1. Zend\Http
8.1.1. Overview
8.1.2. Zend\Http Request, Response and Headers
8.2. Zend\Http\Request
8.2.1. Overview
8.2.2. Quick Start
8.2.3. Configuration Options
8.2.4. Available Methods
8.2.5. Examples
8.3. Zend\Http\Response
8.3.1. Overview
8.3.2. Quick Start
8.3.3. Configuration Options
8.3.4. Available Methods
8.3.5. Examples
8.4. Zend\Http\Headers And The Various Header Classes
8.4.1. Overview
8.4.2. Quick Start
8.4.3. Configuration Options
8.4.4. Available Methods
8.4.5. Examples
8.4.6. Zend\Http\Header\* Base Methods
8.4.7. List of Http Header Types
9. Zend_Loader
9.1. Loading Files and Classes Dynamically
9.1.1. Loading Files
9.1.2. Testing if a File is Readable
9.2. Resource Autoloaders
9.2.1. Resource autoloader usage
9.2.2. The Module Resource Autoloader
9.2.3. Using Resource Autoloaders as Object Factories
9.2.4. Resource Autoloader Reference
10. Zend\Mail
10.1. Zend\Mail\Message
10.1.1. Overview
10.1.2. Quick Start
10.1.3. Configuration Options
10.1.4. Available Methods
10.1.5. Examples
10.2. Zend\Mail\Transport
10.2.1. Overview
10.2.2. Quick Start
10.2.3. Configuration Options
10.2.4. Available Methods
10.2.5. Examples
10.3. Zend\Mail\Transport\SmtpOptions
10.3.1. Overview
10.3.2. Quick Start
10.3.3. Configuration Options
10.3.4. Available Methods
10.3.5. Examples
10.4. Zend\Mail\Transport\FileOptions
10.4.1. Overview
10.4.2. Quick Start
10.4.3. Configuration Options
10.4.4. Available Methods
10.4.5. Examples
11. Zend\Module
11.1. Introduction to the Module System
11.1.1. The autoload_*.php Files
11.2. The Module Manager
11.2.1. Module Manager Events
11.2.2. Module Manager Listeners
11.3. The Module Class
11.3.1. The "loadModules.post" Event
11.3.2. The MVC "bootstrap" Event
11.4. The Module Autoloader
11.4.1. Module Autoloader Usage
11.4.2. Non-Standard / Explicit Module Paths
11.4.3. Packaging Modules with Phar
11.5. Best Practices when Creating Modules
12. Zend\Mvc
12.1. Introduction to the MVC Layer
12.1.1. Basic Application Structure
12.1.2. Basic Module Structure
12.1.3. Bootstrapping an Application
12.1.4. Bootstrapping a Modular Application
12.1.4.1. Configuring the Module Manager
12.1.5. Conclusion
12.2. Quick Start
12.2.1. Install the Zend Skeleton Application
12.2.1.1. Using Git
12.2.1.2. Manual installation
12.2.2. Create a new module
12.2.3. Update the Module class
12.2.4. Create a Controller
12.2.5. Create a view script
12.2.6. Create a route
12.2.7. Tell the application about our module
12.2.8. Test it out!
12.3. Routing
12.3.1. Router Types
12.3.1.1. SimpleRouteStack
12.3.1.2. TreeRouteStack
12.3.2. Route Types
12.3.2.1. Zend\Mvc\Router\Http\Hostname
12.3.2.2. Zend\Mvc\Router\Http\Literal
12.3.2.3. Zend\Mvc\Router\Http\Part
12.3.2.4. Zend\Mvc\Router\Http\Regex
12.3.2.5. Zend\Mvc\Router\Http\Scheme
12.3.2.6. Zend\Mvc\Router\Http\Segment
12.4. The MvcEvent
12.5. Available Controllers
12.5.1. Common Interfaces Used With Controllers
12.5.1.1. InjectApplicationEvent
12.5.1.2. LocatorAware
12.5.1.3. Pluggable
12.5.2. The ActionController
12.5.2.1. Interfaces and Collaborators
12.5.3. The RestfulController
12.5.3.1. Interfaces and Collaborators
12.6. Controller Plugins
12.6.1. The FlashMessenger
12.6.1.1. Examples
12.6.2. The Forward Plugin
12.6.3. The Redirect Plugin
12.6.4. The Url Plugin
12.7. Examples
12.7.1. Controllers
12.7.1.1. Accessing the Request and Response
12.7.1.2. Accessing routing parameters
12.7.1.3. Returning early
12.7.2. Bootstrapping
12.7.2.1. Registering module-specific listeners
13. Zend_Uri
13.1. Zend_Uri
13.1.1. Overview
13.1.2. Creating a New URI
13.1.2.1. Creating a New Custom-Class URI
13.1.3. Manipulating an Existing URI
13.1.4. URI Validation
13.1.4.1. Allowing "Unwise" characters in URIs
13.1.5. Common Instance Methods
13.1.5.1. Getting the Scheme of the URI
13.1.5.2. Getting the Entire URI
13.1.5.3. Validating the URI
14. Zend_View
14.1. Zend\View Quick Start
14.1.1. Overview
14.1.2. Usage
14.2. The PhpRenderer
14.2.1. Usage
14.2.2. Options and Configuration
14.2.3. Additional Methods
14.3. PhpRenderer View Scripts
14.3.1. Escaping Output
14.4. View Helpers
14.4.1. Included Helpers
14.4.1.1. Action View Helper
14.4.1.2. BaseUrl Helper
14.4.1.3. Currency Helper
14.4.1.4. Cycle Helper
14.4.1.5. Partial Helper
14.4.1.6. Placeholder Helper
14.4.1.6.1. Concrete Placeholder Implementations
14.4.1.7. Doctype Helper
14.4.1.8. HeadLink Helper
14.4.1.9. HeadMeta Helper
14.4.1.10. HeadScript Helper
14.4.1.11. HeadStyle Helper
14.4.1.12. HeadTitle Helper
14.4.1.13. HTML Object Helpers
14.4.1.14. InlineScript Helper
14.4.1.15. JSON Helper
14.4.1.16. Navigation Helpers
14.4.1.16.1. Translation of labels and titles
14.4.1.16.2. Integration with ACL
14.4.1.16.3. Navigation setup used in examples
14.4.1.16.4. Breadcrumbs Helper
14.4.1.16.5. Links Helper
14.4.1.16.6. Menu Helper
14.4.1.16.7. Sitemap Helper
14.4.1.16.8. Navigation Helper
14.4.1.17. Translator Helper
14.4.2. Registering Helpers
14.4.3. Writing Custom Helpers
14.4.4. Registering Concrete Helpers
A. Copyright Information

List of Tables

5.1. Connection Array Keys
8.1. Zend\Http\Header\* Classes
14.1. Sitemap XML elements

List of Examples

3.1. Get storage capabilities and do specific stuff in base of it
3.2. Listen to change event
3.3. Using the callback cache pattern
3.4. Using the object cache pattern
3.5. Using the class cache pattern
3.6. Using the output cache pattern
3.7. Using the capture cache pattern
3.8. Get capacity of a disk path, internal php memory, or the system memory
4.1. Using Zend\Config
4.2. Using Zend\Config\Config with a PHP Configuration File
4.3. Using Zend\Config\Writer\Ini
4.4. Using Zend\Config\Writer\Ini
4.5. Using Zend\Config\Writer\PhpArray
4.6. Using Zend\Config\Processor\Constant
4.7. Using Zend\Config\Processor\Filter
4.8. Using Zend\Config\Processor\Queue
4.9. Using Zend\Config\Processor\Token
4.10. Using Zend\Config\Processor\Translator
7.1. Modifying Arguments
7.2. Short Circuiting
7.3. Assigning Priority to Listeners
8.1. Generating a Request object from a string
8.2. Generating a Request object from an array
8.3. Retrieving and setting headers
8.4. Retrieving and setting GET and POST values
8.5. Generating an formatted HTTP Request from an Request object
8.6. Generating a Response object from a string
8.7. Generating a Response object from a string
9.1. Example of the loadFile() Method
9.2. Example of isReadable() method
10.1. Sendmail Transport Usage
10.2. SMTP Transport Usage
10.3. File Transport Usage
10.4. Basic SMTP Transport Usage
10.5. SMTP Transport Usage with PLAIN AUTH
10.6. SMTP Transport Usage with LOGIN AUTH
10.7. SMTP Transport Usage with CRAM-MD5 AUTH
10.8. File Transport Usage
11.1. A Minimal Module
11.2. A Typical Module Class
11.3. Sample Usage of "loadModules.post" Event
11.4. Sample Usage of the MVC "bootstrap" Event
11.5. Registering module paths with the default listener aggregate
11.6. Registering a Non-Standard / Explicit Module Path
13.1. Creating a New URI with Zend_Uri::factory()
13.2. Creating a URI using a custom class
13.3. Manipulating an Existing URI with Zend_Uri::factory()
13.4. URI Validation with Zend_Uri::check()
13.5. Allowing special characters in URIs
13.6. Getting the Scheme from a Zend_Uri_* Object
13.7. Getting the Entire URI from a Zend_Uri_* Object
13.8. Validating a Zend_Uri_* Object
14.1. Configuration
14.2. Controllers and View Models
14.3. Dealing with Layouts
14.4. Creating and Registering Alternate Rendering and Response Strategies
14.5. Basic Usage of Action View Helper
14.6. Registered instance
14.7. Within the view
14.8. Direct usage
14.9. Direct usage
14.10. Cycle Helper Basic Usage
14.11. Working with two or more cycles
14.12. Basic Usage of Partials
14.13. Using PartialLoop to Render Iterable Models
14.14. Rendering Partials in Other Modules
14.15. Basic Usage of Placeholders
14.16. Using Placeholders to Aggregate Content
14.17. Using Placeholders to Capture Content
14.18. Doctype Helper Basic Usage
14.19. Retrieving the Doctype
14.20. HeadLink Helper Basic Usage
14.21. HeadMeta Helper Basic Usage
14.22. Headscript With Conditional Comments
14.23. HeadScript Helper Basic Usage
14.24. Capturing Scripts Using the HeadScript Helper
14.25. Headstyle With Conditional Comments
14.26. HeadStyle Helper Basic Usage
14.27. Capturing Style Declarations Using the HeadStyle Helper
14.28. HeadTitle Helper Basic Usage
14.29. Flash helper
14.30. Customizing the object by passing additional arguments
14.31. Proxying calls to the navigation container
14.32. Rendering breadcrumbs
14.33. Specifying indentation
14.34. Customize breadcrumbs output
14.35. Rendering breadcrumbs using a partial view script
14.36. Specify relations in pages
14.37. Default rendering of links
14.38. Specify which relations to render
14.39. Rendering a menu
14.40. Calling renderMenu() directly
14.41. Rendering the deepest active menu
14.42. Rendering a menu with maximum depth
14.43. Rendering a menu with minimum depth
14.44. Rendering only the active branch of a menu
14.45. Rendering only the active branch of a menu with minimum depth
14.46. Rendering only the active branch of a menu with maximum depth
14.47. Rendering only the active branch of a menu with maximum depth and no parents
14.48. Rendering a custom menu using a partial view script
14.49. Rendering an XML sitemap
14.50. Registered instance
14.51. Within the view
14.52. Direct usage
14.53. Single parameter
14.54. List of parameters
14.55. Array of parameters
14.56. Change locale dynamically
14.57. Change locale statically
14.58. Get the currently set locale