Pro PHP- Patterns, Frameworks, Testing and More
215 ■ ■ ■ CHAPTER 15 Introduction to the Zend Framework The Zend Framework is the result of a massive community effort to develo ...
(^216) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK You will need to pick a common location to place the framework libraries. ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^217 ./document_root ./document_root/images ./document_root/styles ./application ...
(^218) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK Test your results by visiting http://yoursite.com/asdf to make sure that ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^219 front controller, and then call the throwExceptions() method, before finally ...
(^220) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK is indexAction. The default controller file is named IndexController.php ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^221 Defining Models The next step is to create data models that will provide som ...
(^222) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK At this point, you should be able to connect to your database: psql -U d ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^223 Listing 15-5. Database Connection Information for Bootstrapping (in index.ph ...
(^224) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK The next step is to create the view for this information, as shown in Lis ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^225 The Request Object The following five request object methods all work the sa ...
(^226) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK The Response Object The response object contains methods that allow you t ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^227 When visited, at /customers/redirect, this action should forward you to the ...
(^228) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK Listing 15-13. Using View Helpers (application/views/scripts/customers/ad ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^229 Validating Input. Before you can submit the posted information to your datab ...
(^230) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK //If the validators passed this will be true if ($zfi->isValid()) { // ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^231 Listing 15-17. Modifying the Add View (in add.phtml) <?php if(isset($this ...
(^232) CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK Using Metacommands You can change the validation error messages through a ...
CHAPTER 15 ■ INTRODUCTION TO THE ZEND FRAMEWORK^233 Just the Facts In this chapter, you were introduced to the Zend Framework, i ...
McArthur_819-9C15.fm Page 234 Thursday, February 28, 2008 7:44 AM ...
«
8
9
10
11
12
13
14
15
16
17
»
Free download pdf