Programmer's Reference Guide

Zend Framework

2007-05-27


Table of Contents

1. Zend Framework
1.1. Introducere
2. Zend_Acl
2.1. Introduction
2.1.1. About Resources
2.1.2. About Roles
2.1.3. Creating the Access Control List (ACL)
2.1.4. Registering Roles
2.1.5. Defining Access Controls
2.1.6. Querying the ACL
2.2. Refining Access Controls
2.2.1. Precise Access Controls
2.2.2. Removing Access Controls
2.3. Advanced Use
2.3.1. Storing ACL Data for Persistence
2.3.2. Writing Conditional ACL Rules with Assertions
3. Zend_Auth
3.1. Introduction
3.1.1. Adapters
3.1.2. Results
3.1.3. Identity Persistence
3.1.4. Using Zend_Auth
3.2. Authenticating with a Database Table
3.2.1. Introduction
3.2.2. Advanced Use: Persisting a DbTable Result Object
3.3. Digest Authentication
3.3.1. Introduction
3.3.2. Specifics
3.3.3. Identity
3.4. HTTP Authentication Adapter
3.4.1. Introduction
3.4.2. Design Overview
3.4.3. Configuration Options
3.4.4. Resolvers
3.4.5. Basic Usage
4. Zend_Cache
4.1. Introducere
4.2. The theory of caching
4.2.1. The Zend_Cache factory method
4.2.2. Tagging records
4.2.3. Cleaning the cache
4.3. Zend_Cache frontends
4.3.1. Zend_Cache_Core
4.3.2. Zend_Cache_Frontend_Output
4.3.3. Zend_Cache_Frontend_Function
4.3.4. Zend_Cache_Frontend_Class
4.3.5. Zend_Cache_Frontend_File
4.3.6. Zend_Cache_Frontend_Page
4.4. Zend_Cache backends
4.4.1. Zend_Cache_Backend_File
4.4.2. Zend_Cache_Backend_Sqlite
4.4.3. Zend_Cache_Backend_Memcached
4.4.4. Zend_Cache_Backend_APC
4.4.5. Zend_Cache_Backend_ZendPlatform
5. Zend_Config
5.1. Introduction
5.2. Theory of Operation
5.3. Zend_Config_Ini
5.4. Zend_Config_Xml
6. Zend_Console_Getopt
6.1. Introduction to Getopt
6.2. Declaring Getopt Rules
6.2.1. Declaring Options with the Short Syntax
6.2.2. Declaring Options with the Long Syntax
6.3. Fetching Options and Arguments
6.3.1. Handling Getopt Exceptions
6.3.2. Fetching Options by Name
6.3.3. Reporting Options
6.3.4. Fetching Non-option Arguments
6.4. Configuring Zend_Console_Getopt
6.4.1. Adding Option Rules
6.4.2. Adding Help Messages
6.4.3. Adding Option Aliases
6.4.4. Adding Argument Lists
6.4.5. Adding Configuration
7. Zend_Controller
7.1. Zend_Controller Quick Start
7.1.1. Introduction
7.1.2. Quick Start
7.2. Zend_Controller Basics
7.3. The Front Controller
7.3.1. Overview
7.3.2. Primary Methods
7.3.3. Environmental Accessor Methods
7.3.4. Front Controller Parameters
7.3.5. Subclassing the Front Controller
7.4. The Request Object
7.4.1. Introduction
7.4.2. HTTP Requests
7.4.3. Subclassing the Request Object
7.5. The Standard Router: Zend_Controller_Router_Rewrite
7.5.1. Introduction
7.5.2. Using a router
7.5.3. Basic Rewrite Router operation
7.5.4. Default routes
7.5.5. Base URL and subdirectories
7.5.6. Route Types
7.5.7. Using Zend_Config with the RewriteRouter
7.5.8. Subclassing the Router
7.6. The Dispatcher
7.6.1. Overview
7.6.2. Subclassing the Dispatcher
7.7. Action Controllers
7.7.1. Introduction
7.7.2. Object initialization
7.7.3. Pre- and Post-Dispatch Hooks
7.7.4. Accessors
7.7.5. View Integration
7.7.6. Utility Methods
7.7.7. Subclassing the Action Controller
7.8. Action Helpers
7.8.1. Introduction
7.8.2. Helper Initialization
7.8.3. The Helper Broker
7.8.4. Built-in Action Helpers
7.8.5. Writing Your Own Helpers
7.9. The Response Object
7.9.1. Usage
7.9.2. Manipulating Headers
7.9.3. Named Segments
7.9.4. Subclassing the Response Object
7.10. Plugins
7.10.1. Introduction
7.10.2. Writing Plugins
7.10.3. Using Plugins
7.10.4. Retrieving and Manipulating Plugins
7.10.5. Plugins Included in the Standard Distribution
7.11. Using a Conventional Modular Directory Structure
7.11.1. Introduction
7.11.2. Specifying Module Controller Directories
7.11.3. Routing to modules
7.11.4. Module or Global Default Controller
7.12. MVC Exceptions
7.12.1. Introduction
7.12.2. How can you handle exceptions?
7.12.3. MVC Exceptions You May Encounter
7.13. Migrating from Previous Versions
7.13.1. Migrating from 0.9.3 to 1.0.0RC1 or newer
7.13.2. Migrating from 0.9.2 to 0.9.3 or newer
7.13.3. Migrating from 0.6.0 to 0.8.0 or newer
7.13.4. Migrating from 0.2.0 or before to 0.6.0
8. Zend_Date
8.1. Introduction
8.1.1. Always Set a Default Timezone
8.1.2. Why Use Zend_Date?
8.2. Basic Methods
8.2.1. The current date
8.2.2. Zend_Date by Example
8.3. Theory of Operation
8.3.1. Internals
8.4. Zend_Date API Overview
8.4.1. Zend_Date Options
8.4.2. Working with Date Values
8.4.3. Basic Zend_Date Operations Common to Many Date Parts
8.4.4. Comparing Dates
8.4.5. Getting Dates and Date Parts
8.4.6. Working with Fractions of Seconds
8.4.7. Sunrise / Sunset
8.5. Constants for General Date Functions
8.5.1. Using Constants
8.5.2. List of All Constants
8.5.3. Self-Defined OUTPUT Formats with ISO
8.5.4. Self-defined OUTPUT formats using PHP's date() format specifiers
8.6. Working examples
8.6.1. Checking dates
8.6.2. Sunrise and Sunset
8.6.3. Timezones
9. Zend_Db
9.1. Zend_Db_Adapter
9.1.1. Connecting to a Database using an Adapter
9.1.2. The example database
9.1.3. Reading Query Results
9.1.4. Writing Changes to the Database
9.1.5. Quoting Values and Identifiers
9.1.6. Controlling Database Transactions
9.1.7. Listing and Describing Tables
9.1.8. Closing a Connection
9.1.9. Running Other Database Statements
9.1.10. Notes on Specific Adapters
9.2. Zend_Db_Statement
9.2.1. Creating a Statement
9.2.2. Executing a Statement
9.2.3. Fetching Results from a SELECT Statement
9.3. Zend_Db_Profiler
9.3.1. Introduction
9.3.2. Using the Profiler
9.3.3. Advanced Profiler Usage
9.4. Zend_Db_Select
9.4.1. Overview of the Select Object
9.4.2. Creating a Select Object
9.4.3. Building Select queries
9.4.4. Executing Select Queries
9.4.5. Other methods
9.5. Zend_Db_Table
9.5.1. Introduction to Table Class
9.5.2. Defining a Table Class
9.5.3. Creating an Instance of a Table
9.5.4. Inserting Rows to a Table
9.5.5. Updating Rows in a Table
9.5.6. Deleting Rows from a Table
9.5.7. Finding Rows by Primary Key
9.5.8. Querying for a Set of Rows
9.5.9. Querying for a Single Row
9.5.10. Retrieving Table Metadata Information
9.5.11. Caching Table Metadata
9.5.12. Customizing and Extending a Table Class
9.6. Zend_Db_Table_Row
9.6.1. Introduction
9.6.2. Fetching a Row
9.6.3. Writing rows to the database
9.6.4. Serializing and unserializing rows
9.6.5. Extending the Row class
9.7. Zend_Db_Table_Rowset
9.7.1. Introduction
9.7.2. Fetching a Rowset
9.7.3. Retrieving Rows from a Rowset
9.7.4. Retrieving a Rowset as an Array
9.7.5. Serializing and Unserializing a Rowset
9.7.6. Extending the Rowset class
9.8. Zend_Db_Table Relationships
9.8.1. Introduction
9.8.2. Defining Relationships
9.8.3. Fetching a Dependent Rowset
9.8.4. Fetching a Parent Row
9.8.5. Fetching a Rowset via a Many-to-many Relationship
9.8.6. Cascading Write Operations
10. Zend_Debug
10.1. Dumping Variables
11. Zend_Exception
11.1. Using Exceptions
12. Zend_Feed
12.1. Introduction
12.2. Importing Feeds
12.2.1. Custom feeds
12.3. Retrieving Feeds from Web Pages
12.4. Consuming an RSS Feed
12.5. Consuming an Atom Feed
12.6. Consuming a Single Atom Entry
12.7. Modifying Feed and Entry structures
12.8. Custom Feed and Entry Classes
13. Zend_Filter
13.1. Introduction
13.1.1. What is a filter?
13.1.2. Basic usage of filters
13.1.3. Using the static get() method
13.2. Filter Chains
13.3. Writing Filters
13.4. Zend_Filter_Input
13.4.1. Declaring Filter and Validator Rules
13.4.2. Creating the Filter and Validator Processor
13.4.3. Retrieving Validated Fields and other Reports
13.4.4. Using Metacommands to Control Filter or Validator Rules
13.4.5. Adding Filter Class Namespaces
14. Zend_Gdata
14.1. Introduction to Gdata
14.1.1. Structure of Zend_Gdata
14.1.2. Interacting with Google Services
14.1.3. Obtaining instances of Zend_Gdata classes
14.1.4. Google Data Client Authentication
14.1.5. Dependencies
14.1.6. Creating a new Gdata client
14.1.7. Common query parameters
14.1.8. Fetching a feed
14.1.9. Working with data in feeds and entries
14.1.10. Updating entries
14.1.11. Posting entries to Google servers
14.1.12. Deleting entries on Google servers
14.2. Authenticating with AuthSub
14.2.1. Creating an AuthSub authenticated Http Client
14.2.2. Revoking AuthSub authentication
14.3. Authenticating with ClientLogin
14.3.1. Creating a ClientLogin authenticated Http Client
14.3.2. Terminating a ClientLogin authenticated Http Client
14.4. Using Google Spreadsheets
14.4.1. Create a Spreadsheet
14.4.2. Get a List of Spreadsheets
14.4.3. Get a List of Worksheets
14.4.4. Interacting With List-based Feeds
14.4.5. Interacting With Cell-based Feeds
14.5. Catching Gdata Exceptions
15. Zend_Http
15.1. Zend_Http_Client - Introduction
15.1.1. Introduction
15.1.2. Configuration Parameters
15.1.3. Performing Basic HTTP Requests
15.1.4. Adding GET and POST parameters
15.1.5. Accessing Last Request and Response
15.2. Zend_Http_Client - Advanced Usage
15.2.1. HTTP Redirections
15.2.2. Adding Cookies and Using Cookie Persistence
15.2.3. Setting Custom Request Headers
15.2.4. File Uploads
15.2.5. Sending Raw POST Data
15.2.6. HTTP Authentication
15.2.7. Sending Multiple Requests With the Same Client
15.3. Zend_Http_Client - Connection Adapters
15.3.1. Overview
15.3.2. The Socket Adapter
15.3.3. The Proxy Adapter
15.3.4. The Test Adapter
15.3.5. Creating your own connection adapters
15.4. Zend_Http_Cookie and Zend_Http_CookieJar
15.4.1. Introduction
15.4.2. Instantiating Zend_Http_Cookie Objects
15.4.3. Zend_Http_Cookie getter methods
15.4.4. Zend_Http_Cookie: Matching against a scenario
15.4.5. The Zend_Http_CookieJar Class: Instantiation
15.4.6. Adding Cookies to a Zend_Http_CookieJar object
15.4.7. Retrieving Cookies From a Zend_Http_CookieJar object
15.5. Zend_Http_Response
15.5.1. Introduction
15.5.2. Boolean Tester Methods
15.5.3. Accessor Methods
15.5.4. Static HTTP Response Parsers
16. Zend_Json
16.1. Introduction
16.2. Basic Usage
16.3. JSON Objects
17. Zend_Loader
17.1. Loading Files and Classes Dynamically
17.1.1. Loading Files
17.1.2. Loading Classes
17.1.3. Testing if a File is Readable
17.1.4. Using the Autoloader
18. Zend_Locale
18.1. Introduction
18.1.1. What is Localization
18.1.2. What is a Locale?
18.1.3. How are Locales Represented?
18.1.4. Selecting the Right Locale
18.1.5. ZF Locale-Aware Classes
18.1.6. Zend_Locale_Format::setOptions(array $options)
18.2. Using Zend_Locale
18.2.1. Copying, Cloning, and Serializing Locale Objects
18.2.2. isEqual() - Equality
18.2.3. Default locales
18.2.4. Set a new locale
18.2.5. Getting the language and region
18.2.6. Obtaining localized strings
18.2.7. Obtaining translations for "yes" and "no"
18.3. Normalization and Localization
18.3.1. Number normalization: getNumber($input, Array $options)
18.3.2. Number localization
18.3.3. Number testing
18.3.4. Float value normalization
18.3.5. Floating point value localization
18.3.6. Floating point value testing
18.3.7. Integer value normalization
18.3.8. Integer point value localization
18.3.9. Integer value testing
18.3.10. Numeral System Conversion
18.4. Working with Dates and Times
18.4.1. Normalizing Dates and Times
18.4.2. Testing Dates
18.4.3. Normalizing a Time
18.4.4. Testing Times
18.5. Supported Languages for Locales
18.6. Supported Regions for Locales
19. Zend_Log
19.1. Overview
19.1.1. Creating a Log
19.1.2. Logging Messages
19.1.3. Destroying a Log
19.1.4. Using Built-in Priorities
19.1.5. Adding User-defined Priorities
19.1.6. Understanding Log Events
19.2. Writers
19.2.1. Writing to Streams
19.2.2. Writing to Databases
19.2.3. Stubbing Out the Writer
19.2.4. Testing with the Mock
19.2.5. Compositing Writers
19.3. Formatters
19.3.1. Simple Formatting
19.3.2. Formatting to XML
19.4. Filters
19.4.1. Filtering for All Writers
19.4.2. Filtering for a Writer Instance
20. Zend_Mail
20.1. Introduction
20.2. Sending via SMTP
20.3. Sending Multiple Mails per SMTP Connection
20.4. Using Different Transports
20.5. HTML E-Mail
20.6. Attachments
20.7. Adding Recipients
20.8. Controlling the MIME Boundary
20.9. Additional Headers
20.10. Character Sets
20.11. Encoding
20.12. SMTP Authentication
20.13. Securing SMTP Transport
20.14. Reading Mail Messages
20.14.1. Simple example using Pop3
20.14.2. Opening a local storage
20.14.3. Opening a remote storage
20.14.4. Fetching messages and simple methods
20.14.5. Working with messages
20.14.6. Checking for flags
20.14.7. Using folders
20.14.8. Advanced Use
21. Zend_Measure
21.1. Introduction
21.2. Creation of Measurements
21.2.1. Creating measurements from integers and floats
21.2.2. Creating measurements from strings
21.2.3. Measurements from localized strings
21.3. Outputting measurements
21.3.1. Automatic output
21.3.2. Outputting values
21.3.3. Output with unit of measurement
21.3.4. Output as localized string
21.4. Manipulating Measurements
21.4.1. Convert
21.4.2. Add and subtract
21.4.3. Compare
21.4.4. Compare
21.4.5. Manually change values
21.4.6. Manually change types
21.5. Types of measurements
21.5.1. Hints for Zend_Measure_Binary
21.5.2. Hints for Zend_Measure_Number
21.5.3. Roman numbers
22. Zend_Memory
22.1. Overview
22.1.1. Introduction
22.1.2. Theory of Operation
22.2. Memory Manager
22.2.1. Creating a Memory Manager
22.2.2. Managing Memory Objects
22.2.3. Memory Manager Settings
22.3. Memory Objects
22.3.1. Movable
22.3.2. Locked
22.3.3. Memory container 'value' property.
22.3.4. Memory container interface
23. Zend_Mime
23.1. Zend_Mime
23.1.1. Introduction
23.1.2. Static Methods and Constants
23.1.3. Instantiating Zend_Mime
23.2. Zend_Mime_Message
23.2.1. Introduction
23.2.2. Instantiation
23.2.3. Adding MIME Parts
23.2.4. Boundary handling
23.2.5. parsing a string to create a Zend_Mime_Message object (experimental)
23.3. Zend_Mime_Part
23.3.1. Introduction
23.3.2. Instantiation
23.3.3. Methods for rendering the message part to a string
24. Zend_Pdf
24.1. Introduction.
24.2. Creating and loading PDF documents.
24.3. Save changes to the PDF document.
24.4. Document pages.
24.5. Drawing.
24.5.1. Geometry.
24.5.2. Colors.
24.5.3. Shape Drawing.
24.5.4. Text Drawing.
24.5.5. Using fonts.
24.5.6. Image Drawing.
24.5.7. Line drawing style.
24.5.8. Fill style.
24.5.9. Rotations.
24.5.10. Save/restore graphics state.
24.5.11. Clipping draw area.
24.5.12. Styles.
24.6. Zend_Pdf module usage example.
25. Zend_Registry
25.1. Using the Registry
25.1.1. Setting Values in the Registry
25.1.2. Getting Values from the Registry
25.1.3. Constructing a Registry Object
25.1.4. Accessing the Registry as an Array
25.1.5. Accessing the Registry as an Object
25.1.6. Querying if an index exists
25.1.7. Extending the Registry
25.1.8. Unsetting the Static Registry
26. Zend_Rest
26.1. Introduction
26.2. Zend_Rest_Client
26.2.1. Introduction
26.2.2. Responses
26.2.3. Request Arguments
26.3. Zend_Rest_Server
26.3.1. Introduction
26.3.2. REST Server Usage
26.3.3. Calling a Zend_Rest_Server Service
26.3.4. Sending A Custom Status
26.3.5. Returning Custom XML Responses
27. Zend_Search_Lucene
27.1. Overview
27.1.1. Introduction
27.1.2. Document and Field Objects
27.1.3. Understanding Field Types
27.1.4. HTML documents
27.2. Building Indexes
27.2.1. Creating a New Index
27.2.2. Updating Index
27.2.3. Updating Documents
27.2.4. Retrieving Index size
27.2.5. Index optimization
27.2.6. Limitationas
27.3. Searching an Index
27.3.1. Building Queries
27.3.2. Search Results
27.3.3. Results Scoring
27.3.4. Search Result Sorting
27.3.5. Search Results Highlighting
27.4. Query Language
27.4.1. Terms
27.4.2. Fields
27.4.3. Term Modifiers
27.4.4. Proximity Searches
27.4.5. Boosting a Term
27.4.6. Boolean Operators
27.4.7. Grouping
27.4.8. Field Grouping
27.4.9. Escaping Special Characters
27.5. Query Construction API
27.5.1. Query Parser Exceptions
27.5.2. Term Query
27.5.3. Multi-Term Query
27.5.4. Phrase Query
27.6. Character set.
27.6.1. UTF-8 and single-byte character sets support.
27.6.2. Default text analyzer.
27.6.3. UTF-8 compatible text analyzer.
27.7. Extensibility
27.7.1. Text Analysis
27.7.2. Tokens Filtering
27.7.3. Scoring Algorithms
27.7.4. Storage Containers
27.8. Interoperating with Java Lucene
27.8.1. File Formats
27.8.2. Index Directory
27.8.3. Java Source Code
27.9. Advanced
27.9.1. Using index as static property
28. Zend_Server
28.1. Introduction
28.2. Zend_Server_Reflection
28.2.1. Introduction
28.2.2. Usage
29. Zend_Service
29.1. Introduction
29.2. Zend_Service_Akismet
29.2.1. Introduction
29.2.2. Verify an API key
29.2.3. Check for spam
29.2.4. Submitting known spam
29.2.5. Submitting false positives (ham)
29.2.6. Zend-specific Accessor Methods
29.3. Zend_Service_Amazon
29.3.1. Introduction
29.3.2. Country Codes
29.3.3. Looking up a Specific Amazon Item by ASIN
29.3.4. Performing Amazon Item Searches
29.3.5. Using the Alternative Query API
29.3.6. Zend_Service_Amazon Classes
29.4. Zend_Service_Audioscrobbler
29.4.1. Introduction to Searching Audioscrobbler
29.4.2. Users
29.4.3. Artists
29.4.4. Tracks
29.4.5. Tags
29.4.6. Groups
29.4.7. Forums
29.5. Zend_Service_Delicious
29.5.1. Introduction
29.5.2. Retrieving posts
29.5.3. Zend_Service_Delicious_PostList
29.5.4. Editing posts
29.5.5. Deleting posts
29.5.6. Adding new posts
29.5.7. Tags
29.5.8. Bundles
29.5.9. Public data
29.5.10. HTTP client
29.6. Zend_Service_Flickr
29.6.1. Introduction to Searching Flickr
29.6.2. Finding Flickr Users' Photos and Information
29.6.3. Retrieving Flickr Image Details
29.6.4. Zend_Service_Flickr Result Classes
29.7. Zend_Service_Simpy
29.7.1. Introduction
29.7.2. Links
29.7.3. Tags
29.7.4. Notes
29.7.5. Watchlists
29.8. Zend_Service_Yahoo
29.8.1. Introduction
29.8.2. Searching the Web with Yahoo!
29.8.3. Finding Images with Yahoo!
29.8.4. Finding Local Businesses and Services with Yahoo!
29.8.5. Searching Yahoo! News
29.8.6. Zend_Service_Yahoo Classes
30. Zend_Session
30.1. Introduction
30.2. Basic Usage
30.2.1. Tutorial Examples
30.2.2. Iterating Over Session Namespaces
30.2.3. Accessors for Session Namespaces
30.3. Advanced Usage
30.3.1. Starting a Session
30.3.2. Locking Session Namespaces
30.3.3. Namespace Expiration
30.3.4. Session Encapsulation and Controllers
30.3.5. Limiting Instances of Zend_Session_Namespace to One Per Namespace
30.3.6. Working with Arrays in Namespaces
30.3.7. Using Sessions with Authentication
30.3.8. Using Sessions with Unit Tests
30.4. Global Session Management
30.4.1. Zend_Session::setOptions()
30.4.2. Options
30.4.3. Errors
30.4.4. regenerateId()
30.4.5. rememberMe(integer $seconds)
30.4.6. forgetMe()
30.4.7. sessionExists()
30.4.8. destroy(bool $remove_cookie = true, bool $readonly = true)
30.4.9. stop()
30.4.10. writeClose($readonly = true)
30.4.11. expireSessionCookie()
30.4.12. setSaveHandler(Zend_Session_SaveHandler_Interface $interface)
30.4.13. namespaceIsset($namespace)
30.4.14. namespaceUnset($namespace)
30.4.15. namespaceGet($namespace)
30.4.16. getIterator()
30.5. Theory
31. Zend_Translate
31.1. Introduction
31.1.1. Starting multi-lingual
31.2. Adapters for Zend_Translate
31.2.1. How to decide which translation adapter to use
31.3. Using Translation Adapters
31.3.1. Translation Source Structures
31.3.2. Creating array source files
31.3.3. Creating Gettext Source Files
31.3.4. Creating TMX Source Files
31.3.5. Creating CSV Source Files
31.3.6. Options for adapters
31.3.7. Checking for translations
32. Zend_Uri
32.1. Zend_Uri
32.1.1. Privire de ansamblu
32.1.2. Crearea unui nou identificator de resursă (URI)
32.1.3. Manipularea unui identificator de resursă (URI) existent
32.1.4. Validarea unui URI
32.1.5. Metode obişnuite de creat instanţe
33. Zend_Validate
33.1. Introduction
33.1.1. What is a validator?
33.1.2. Basic usage of validators
33.1.3. Customizing messages
33.1.4. Using the static is() method
33.2. Validator Chains
33.3. Writing Validators
33.4. Validating Email Addresses
33.5. Validating Hostnames
34. Zend_Version
34.1. Citirea versiunii de Zend Framework
35. Zend_View
35.1. Introduction
35.1.1. Controller Script
35.1.2. View Script
35.1.3. Options
35.1.4. Utility Accessors
35.2. Controller Scripts
35.2.1. Assigning Variables
35.2.2. Rendering a View Script
35.2.3. View Script Paths
35.3. View Scripts
35.3.1. Escaping Output
35.3.2. Using Alternate Template Systems
35.4. View Helpers
35.4.1. Initial Helpers
35.4.2. Helper Paths
35.4.3. Writing Custom Helpers
36. Zend_XmlRpc
36.1. Introduction
36.2. Zend_XmlRpc_Client
36.2.1. Introduction
36.2.2. Method Calls
36.2.3. Types and Conversions
36.2.4. Server Proxy Object
36.2.5. Error Handling
36.2.6. Server Introspection
36.2.7. From Request to Response
36.2.8. HTTP Client and Testing
36.3. Zend_XmlRpc_Server
36.3.1. Introduction
36.3.2. Basic Usage
36.3.3. Server Structure
36.3.4. Conventions
36.3.5. Utilizing Namespaces
36.3.6. Custom Request Objects
36.3.7. Custom Responses
36.3.8. Handling Exceptions via Faults
36.3.9. Caching Server Definitions Between Requests
36.3.10. Usage Examples
A. Zend Framework PHP Coding Standard
A.1. Overview
A.1.1. Scope
A.1.2. Goals
A.2. PHP File Formatting
A.2.1. General
A.2.2. Indentation
A.2.3. Maximum Line Length
A.2.4. Line Termination
A.3. Naming Conventions
A.3.1. Classes
A.3.2. Interfaces
A.3.3. Filenames
A.3.4. Functions and Methods
A.3.5. Variables
A.3.6. Constants
A.4. Coding Style
A.4.1. PHP Code Demarcation
A.4.2. Strings
A.4.3. Arrays
A.4.4. Classes
A.4.5. Functions and Methods
A.4.6. Control Statements
A.4.7. Inline Documentation
B. Informaţii privind drepturile de autor
Index

List of Tables

2.1. Access Controls for an Example CMS
3.1. Configuration Options
4.1. Available options
4.2. Available options
4.3. Available options
4.4. Available options
4.5. Available options
4.6. Available options
4.7. Available options
4.8. Available options
5.1. Zend_Config_Ini Constructor parameters
8.1. Date Parts
8.2. Basic Operations
8.3. Date Comparison Methods
8.4. Date Output Methods
8.5. Date Output Methods
8.6. Miscellaneous Methods
8.7. Operations involving Zend_Date::HOUR
8.8. Day Constants
8.9. Week Constants
8.10. Month Constants
8.11. Year Constants
8.12. Time Constants
8.13. Timezone Constants
8.14. Date Format Constants (formats include timezone)
8.15. Date and Time Formats (format varies by locale)
8.16. Constants for ISO 8601 date output
8.17. Constants for PHP date output
8.18. Types of supported horizons for sunset and sunrise
9.1. Metadata fields returned by describeTable()
9.2. Constants used by getPart() and reset()
15.1. Zend_Http_Client configuration parameters
15.2. Zend_Http_Client configuration parameters
18.1. Details for getTranslationList($type = null, $locale = null)
18.2. Format tokens for self generated number formats
18.3. List of supported numeral systems
18.4. Key values for getDate() with option 'fix_date'
18.5. Return values
18.6. Format definition
18.7. Example formats
18.8. List of all supported languages
18.9. List of all supported regions
20.1. Mail Read Feature Overview
20.2. Mail Folder Names
21.1. List of measurement types
27.1. Zend_Search_Lucene_Field Types
29.1. Zend_Service_Amazon_Item Properties
29.2. Zend_Service_Amazon_Image Properties
29.3. Zend_Service_Amazon_OfferSet Properties
29.4. Properties
29.5. Zend_Service_Amazon_SimilarProduct Properties
29.6. Zend_Service_Amazon_Accessories Properties
29.7. Zend_Service_Amazon_CustomerReview Properties
29.8. Zend_Service_Amazon_EditorialReview Properties
29.9. Zend_Service_Amazon_Listmania Properties
29.10. Methods for retrieving public data
29.11. Methods of the Zend_Service_Delicious_SimplePost class
29.12. Zend_Service_Flickr_ResultSet Properties
29.13. Zend_Service_Flickr_Result Properties
29.14. Zend_Service_Flickr_Image Properties
29.15. Zend_Service_Yahoo_ResultSet
29.16. Zend_Service_Yahoo_LocalResultSet Properties
29.17. Zend_Service_Yahoo_Result Properties
29.18. Zend_Service_Yahoo_WebResult Properties
29.19. Zend_Service_Yahoo_ImageResult Properties
29.20. Zend_Service_Yahoo_LocalResult Properties
29.21. Zend_Service_Yahoo_NewsResult Properties
29.22. Zend_Service_Yahoo_Image Properties
31.1. Adapters for Zend_Translate
36.1. PHP and XML-RPC Type Conversions
36.2. Zend_XmlRpc_Value Objects for XML-RPC Types

List of Examples

2.1. Multiple inheritance between Roles
3.1. Modifying the Session Namespace
3.2. Using a Custom Storage Class
3.3. Basic Usage
4.1. Obţinerea unei interfeţe cu Zend_Cache::factory()
4.2. Caching output with Zend_Cache output frontend
5.1. Using Zend_Config Per Se
5.2. Using Zend_Config_Ini
5.3. Using Zend_Config_Xml
6.1. Using the Short Syntax
6.2. Using the Long Syntax
6.3. Catching Getopt Exceptions
6.4. Using getOption()
6.5. Using __get() and __isset() magic methods
6.6. Using getRemainingArgs()
6.7. Using addRules()
6.8. Using setHelp()
6.9. Using setAliases()
6.10. Using addArguments() and setArguments()
6.11. Using setOption()
6.12. Using setOptions()
7.1. Setting Options
7.2. Using Defaults
7.3. Using goto()'s _forward() API
7.4. Using route assembly with gotoRout()
7.5. Basic Usage
7.6. Disabling autorender
7.7. Choosing a different view script
7.8. Modifying the registered view
7.9. Changing the path specifications
7.10. Rendering multiple view scripts from a single action
7.11. Standard usage
7.12. Setting a different error handler
7.13. Using accessors
8.1. Setting a default timezone
8.2. Creating the current date
8.3. get() - output a date
8.4. set() - set a date
8.5. add() - adding dates
8.6. compare() - compare dates
8.7. equals() - identify a date or date part
8.8. User-specified input date format
8.9. Operating on Parts of Dates
8.10. Example usage for self-defined ISO formats
8.11. Example usage for self-defined formats with PHP specifier
8.12. Checking dates
8.13. Getting all avaiable cities
8.14. Getting the location for a city
8.15. Calculating sun informations
8.16. Working with timezones
8.17. Multiple timezones
9.1. Using an Adapter constructor
9.2. Using the Adapter factory method
9.3. Passing the case-folding option to the factory
9.4. Passing PDO driver options to the factory
9.5. Handling connection exceptions
9.6. Using fetchAll()
9.7. Using setFetchMode()
9.8. Using fetchAssoc()
9.9. Using fetchCol()
9.10. Using fetchPairs()
9.11. Using fetchRow()
9.12. Using fetchOne()
9.13. Inserting to a table
9.14. Inserting expressions to a table
9.15. Using lastInsertId() for an auto-increment key
9.16. Using lastInsertId() for a sequence
9.17. Using lastSequenceId()
9.18. Updating rows
9.19. Updating rows using an array of expressions
9.20. Deleting rows
9.21. Using quote()
9.22. Using quoteInto()
9.23. Using quoteIdentifier()
9.24. Managing a transaction to ensure consistency
9.25. Closing a database connection
9.26. Running a non-prepared statement in a PDO adapter
9.27. Creating a SQL statement object with query()
9.28. Using a SQL statement constructor
9.29. Executing a statement with positional parameters
9.30. Executing a statement with named parameters
9.31. Using fetch() in a loop
9.32. Using fetchAll()
9.33. Setting the fetch mode
9.34. Using fetchColumn()
9.35. Using fetchObject()
9.36. Example of the database adapter's select() method
9.37. Example of creating a new Select object
9.38. Example of the using methods to add clauses
9.39. Example of the using the fluent interface
9.40. Example of the from() method
9.41. Example of specifying a table correlation name
9.42. Example of specifying a schema name
9.43. Examples of specifying columns
9.44. Examples of specifying columns containing expressions
9.45. Examples of quoting columns in an expression
9.46. Example of the join() method
9.47. Examples of specifying no columns
9.48. Example of the where() method
9.49. Example of a parameter in the where() method
9.50. Example of multiple where() methods
9.51. Example of the orWhere() method
9.52. Example of parenthesizing Boolean expressions
9.53. Example of the group() method
9.54. Example of the having() method
9.55. Example of the order() method
9.56. Example of the limit() method
9.57. Example of the distinct() method
9.58. Example of forUpdate() method
9.59. Example using the Db adapter's query() method
9.60. Example using the Select object's query method
9.61. Example of the __toString() method
9.62. Example of the getPart() method
9.63. Example of the reset() method
9.64. Declaring a table class with explicit table name
9.65. Declaring a table class with implicit table name
9.66. Declaring a table class with schema
9.67. Declaring table and schema names upon instantiation
9.68. Example of specifying the primary key
9.69. Example of overriding the _setupTableName() method
9.70. Example of constructing a Table using an Adapter object
9.71. Example of constructing a Table using a the Default Adapter
9.72. Example of constructing a Table using a Registry key
9.73. Example of inserting to a Table
9.74. Example of inserting expressions to a Table
9.75. Example of declaring a Table with auto-incrementing primary key
9.76. Example of declaring a Table with a sequence
9.77. Example of declaring a Table with a natural key
9.78. Example of updating rows in a Table
9.79. Example of deleting rows from a Table
9.80. Example of finding rows by primary key values
9.81. Example of finding rows by compound primary key values
9.82. Example of finding rows by an expression
9.83. Example of finding rows by an expression
9.84. Example of finding a single row by an expression
9.85. Example of getting the table name
9.86. Using a Default Metadata Cache for all Table Objects
9.87. Using a Metadata Cache for a Specific Table Object
9.88. Example of specifying the Row and Rowset classes
9.89. Example of changing the Row and Rowset classes
9.90. Custom logic to manage timestamps
9.91. Custom method to find bugs by status
9.92. Example of an abstract table class that implements inflection
9.93. Example of fetching a row
9.94. Example of reading a row in a rowset
9.95. Example of reading a column in a row
9.96. Example of using the toArray() method
9.97. Example of changing a column in a row
9.98. Example of creating a new row for a table
9.99. Example of populating a new row for a table
9.100. Example of using setFromArray() to set values in a new Row
9.101. Example of deleting a row
9.102. Example of serializing a row
9.103. Example of unserializing a serialized row
9.104. Example of reactivating a row
9.105. Specifying a custom Row class
9.106. Example of custom logic in a Row class
9.107. Example of a Row class that logs insert data for multiple tables
9.108. Example of defining an inflection transformation
9.109. Example of fetching a rowset
9.110. Counting the Rows in a Rowset
9.111. Reading a Single Row from a Rowset
9.112. Iterating through a Rowset
9.113. Using toArray()
9.114. Serializing a Rowset
9.115. Unserializing a Serialized Rowset
9.116. Reactivating a Rowset as Live Data
9.117. Specifying a custom Rowset class
9.118. Example of Rowset class with a new method
9.119. Fetching a Dependent Rowset
9.120. Fetching a Dependent Rowset By a Specific Rule
9.121. Fetching Dependent Rowsets using the Magic Method
9.122. Fetching the Parent Row
9.123. Fetching a Parent Row By a Specific Rule
9.124. Fetching the Parent Row using the Magic Method
9.125. Fetching a Rowset with the Many-to-many Method
9.126. Fetching a Rowset with the Many-to-many Method By a Specific Rule
9.127. Fetching Rowsets using the Magic Many-to-many Method
9.128. Example of a Cascading Delete
9.129. Example Declaration of Cascading Operations
10.1. Example of dump() method
11.1. Example of catching an exception
12.1. Putting Zend_Feed to Work on RSS Feed Data
12.2. Basic Use of an Atom Feed
12.3. Reading a Single-Entry Atom Feed
12.4. Using the Entry Object Directly for a Single-Entry Atom Feed
12.5. Modifying an Existing Feed Entry
12.6. Creating an Atom Entry with Elements of Custom Namespaces
12.7. Extending the Atom Entry Class with Custom Namespaces
15.1. Instantiating a Zend_Http_Client object
15.2. Preforming a Simple GET Request
15.3. Using Request Methods Other Than GET
15.4. Setting GET Parameters
15.5. Setting POST Parameters
15.6. Forcing RFC 2616 Strict Redirections on 301 and 302 Responses
15.7. Setting Cookies Using setCookie()
15.8. Enabling Cookie Stickiness
15.9. Setting A Single Custom Request Header
15.10. Setting Multiple Custom Request Headers
15.11. Using setFileUpload to Upload Files
15.12. Sending Raw POST Data
15.13. Setting HTTP Authentication User and Password
15.14. Performing consecutive requests with one client
15.15. Changing the HTTPS transport layer
15.16. Using Zend_Http_Client behind a proxy server
15.17. Testing Against a Single HTTP Response Stub
15.18. Testing Against Multiple HTTP Response Stubs
15.19. Creating your own connection adapter
15.20. Instantiating a Zend_Http_Cookie object
15.21. Stringifying a Zend_Http_Cookie object
15.22. Using getter methods with Zend_Http_Cookie
15.23. Matching cookies
15.24. Instantiating a Zend_Http_Response object using the factory method
15.25. Using the isError() method to validate a response
15.26. Using Zend_Http_Response Accessor Methods
15.27. Accessing Response Headers
17.1. Example of loadFile() method
17.2. Example of loadClass() method
17.3. Example of isReadable() method
17.4. Example of registering the autoloader callback method
17.5. Example of registering the autoload callback method from an extended class
18.1. Choosing a specific locale
18.2. Automatically selecting a locale
18.3. Dates default to correct locale of web users
18.4. Overriding default locale selection
18.5. Performance optimization when using a default locale
18.6. Dates default to correct locale of web users
18.7. clone
18.8. Check for equal locales
18.9. Get default locales
18.10. setLocale
18.11. Convenience functions for getTranslation()
18.12. getTranslationList
18.13. Converting country name in one language to another
18.14. All available translations
18.15. All Languages written in their native language
18.16. getQuestion()
18.17. Number normalization
18.18. Number normalization with precision
18.19. Number localization
18.20. Number localization with precision
18.21. Using a self defined number format
18.22. Number testing
18.23. Floating point value normalization
18.24. Floating point value localization
18.25. Floating point value testing
18.26. Integer value normalization
18.27. Integer value localization
18.28. Integer value testing
18.29. Converting numerals from Eastern Arabic scripts to European/Latin scripts
18.30. Converting numerals from Latin script to Eastern Arabic script
18.31. Getting 4 letter CLDR script code using a native-language name of the script
18.32. Normalizing a date
18.33. Normalizing a date by locale
18.34. Normalizing a date with time
18.35. Normalizing a userdefined date
18.36. Automatic correction of input dates
18.37. Date testing
18.38. Normalize an unknown time
18.39. Testing a time
20.1. Simple E-Mail with Zend_Mail
20.2. Sending E-Mail via SMTP
20.3. Sending Multiple Mails per SMTP Connection
20.4. Using Different Transports
20.5. Sending HTML E-Mail
20.6. E-Mail Messages with Attachments
20.7. Changing the MIME Boundary
20.8. Adding E-Mail Message Headers
20.9. Enabling authentication within Zend_Mail_Transport_Smtp
20.10. Enabling a secure connection within Zend_Mail_Transport_Smtp
21.1. Converting measurements
21.2. The meter measurement
21.3. Creation using integer and floating values
21.4. Creation using strings
21.5. Arbitrary text input containing measurements
21.6. Localized string
21.7. Automatic output
21.8. Output a value
21.9. Outputting units
21.10. Convert
21.11. Adding units
21.12. Subtract
21.13. Different measurements
21.14. Identical measurements
21.15. Difference
21.16. Changing a value
21.17. Changing the type
22.1. Using Zend_Memory component
24.1. Create new or load existing PDF document.
24.2. Requesting specified revision of the PDF document.
24.3. Save PDF document.
24.4. PDF document pages management.
24.5. Draw a string on the page.
24.6. Draw a UTF-8-encoded string on the page.
24.7. Create a standard font.
24.8. Create a TrueType font.
24.9. Create a TrueType font, but do not embed it in the PDF document.
24.10. Do not throw an exception for fonts that cannot be embeded.
24.11. Do not compress an embedded font.
24.12. Combining font embedding options.
24.13. Image drawing.
24.14. Zend_Pdf module usage demo.
25.1. Example of set() method
25.2. Example of get() method
25.3. Example of iterating over the registry
25.4. Example of constructing a registry
25.5. Example of initializing the static registry
25.6. Example of array access
25.7. Example of object access
25.8. Example of isRegistered() method
25.9. Example of isset() method
25.10. Example of specifying the static registry's class name
25.11. Example of _unsetInstance() method
26.1. A basic REST request
26.2. Response Status
26.3. Using Technorati's Rest Service
26.4. Example Technorati Response
26.5. Setting Request Arguments
26.6. Basic Zend_Rest_Server Usage - Classes
26.7. Basic Zend_Rest_Server Usage - Functions
26.8. Returning Custom Status
26.9. Return Custom XML
27.1. Custom text Analyzer.
29.1. isSpam() Usage
29.2. submitSpam() Usage
29.3. submitHam() Usage
29.4. Search Amazon Using the Traditional API
29.5. Search Amazon Using the Query API
29.6. Choosing an Amazon Web Service Country
29.7. Looking up a Specific Amazon Item by ASIN
29.8. Performing Amazon Item Searches
29.9. Search Amazon Using the Alternative Query API
29.10. Retrieving User Profile Information
29.11. Retrieving a User's Weekly Artist Chart
29.12. Retrieving Related Artists
29.13. Get all posts
29.14. Accessing post lists
29.15. Post editing
29.16. Method call chaining
29.17. Deleting posts
29.18. Adding a post
29.19. Tags
29.20. Bundles
29.21. Retrieving public data
29.22. Changing the HTTP client of Zend_Rest_Client
29.23. Configuring your HTTP client to keep connections alive
29.24. Simple Flickr Photo Search
29.25. Finding a Flickr User's Public Photos by E-Mail Address
29.26. Retrieving Flickr Image Details
29.27. Querying Links
29.28. Modifying Links
29.29. Working With Tags
29.30. Working With Notes
29.31. Retrieving Watchlists
29.32. Searching the Web with Yahoo!
29.33. Finding Images with Yahoo!
29.34. Finding Local Businesses and Services with Yahoo!
29.35. Searching Yahoo! News
30.1. Counting Page Views
30.2. New Way: Namespaces Avoid Collisions
30.3. Old Way: PHP Session Access
30.4. Session Iteration
30.5. Accessing Session Data
30.6. Starting the Global Session
30.7. Locking Session Namespaces
30.8. Locking Sessions in Views
30.9. Expiration Examples
30.10. Namespaced Sessions for Controllers with Automatic Expiration
30.11. Limiting to Single Instances
30.12. Known problem with arrays
30.13. Workaround: fetch, modify, save
30.14. Workaround: store array containing reference
30.15. Example: Simplified access of authorization ids
30.16. Using PHPUnit to test code written using Zend_Session*
30.17. Using Zend_Config to Configure Zend_Session
30.18. myapp.ini
30.19. Anonymous Sessions and Session Fixation
30.20. Unsetting All Namespaces
31.1. Example of single-language PHP code
31.2. Example of multi-lingual PHP code
31.3. Example TMX file
31.4. Example CSV file
31.5. Example CSV file two
31.6. Using translation options
31.7. Checking if a text is translateable
32.1. Crearea unui nou URI cu Zend_Uri::factory()
32.2. Manipularea unui identificator de resursă (UR) existent cu Zend_Uri::factory()
32.3. Validarea unui URI cu Zend_Uri::check()
32.4. Obţinerea schemei dintr-un obiect Zend_Uri_*
32.5. Obţinerea întregului identificator dintr-un obiect Zend_Uri_*
32.6. Validarea unui obiect Zend_Uri_*
34.1. Examplu pentru metoda compareVersion()
36.1. XML-RPC Method Call
36.2. XML-RPC Method Call with Parameters
36.3. Proxy the Default Namespace
36.4. Proxy Any Namespace
36.5. Handling HTTP Errors
36.6. Handling XML-RPC Faults
36.7. Processing Request to Response