ZendFramework-2.2.5参考手册

所需积分/C币:10 2014-01-12 19:09:19 4.74MB PDF
0
收藏 收藏
举报

ZendFramework-2.2.5参考手册
Contents 1 Overview 2 Installation 3 Getting Started with Zend Framework 2 5 3.1 Some assumptions 3.2 The tutorial application 4 Getting started: A skeleton application 4.1 Using the Apache Web Server 4.2 Error reporting 789 5 Modules 5.1 Setting up the album module 5.2 Configuration 5.3 Informing the application about our new module 6 Routing and controllers 7 Create the controller 7.1 Initialise the view scripts .18 8 Database and models 8.1 The datab 8.2 The model files 19 8.3 Using ServiceManager to configure the table gateway and inject into the AlbumTable 8. 4 Back to the controller 8.5 Listing albums 23 9 Styling and Translations 27 10 Forms and actions 29 10.1 Adding new albums 29 10.2 Editing an album 4 10.3 Deleting an album 36 10.4 Ensuring that the home page displays the list of albums 11 Conclusion 12 Zend Framework Tool (ZFTool) 12.1 Installation using Composer 41 12.2 Manual installation 12.3 Without installation, using the Phar file 12, 4 Usage 42 13 Learning Dependency Injection 13. 1 Very brief introduction to Di 5 13.2 Simplest usage case (2 classes, one consumes the other) 13.3 Simplest Usage Case Without Type-hints 47 13.4 Simplest usage case with Compiled Definition 13.5 Creating a precompiled definition for others to use 13.6 Using Multiple Definitions From Multiple Sources 50 13. 7 Generating Service Locators 14 Unit Testing a Zend Framework 2 application 14. 1 Setting up the te 14.2 Bootstrapping your tests ·· 56 14.3 Your first controller test 58 14. 4 A failing test case 14.5 Configuring the service manager for the tests 60 14.6 Testing actions with POST 6 14.7 Testing model entities 8 Testing model tables 64 14.9 Conclusion 68 15 Using the EventManager 15.1 Terminology ...69 15.2 Getting started 69 15.3 Shared managers ....71 16 Wildcards 17 Listener aggregates 75 17.1 Introspecting results 76 17.2 Short-ciruiting listener execution .76 17.3 Keeping it in order ···· 17.4 Custom event objects 78 17.5 Putting it together: Implementing a simple caching system 79 17.6 Conclusion 18 Advanced Configuration Tricks 18.1 System configuration 18.2 Module Configuration 18.3 Configuration mapping table 88 18.4 Configuration Priority 88 18.5 Configuration me merging workflow 19 Using Zend Navigation in your Album Module 19.1 Preparation 91 9. 2 Setting Up Zend naviga 19.3 Configuring our Site Map 19.4 Adding the Menu View Helper 19.5 Adding breadcrumbs 20 Using Zend \Paginator in your Album Module 95 20.1 Preparation 95 20.2 Modifying the albumTable 98 20.3 Modifying the Album Controller 20.4 Updating the view Script 20.5 Creating the Pagination Control Partial ..100 21 Using the Pagination Control View Helper 103 22 Setting up a database adapter 105 22.1 Introduction 105 22.2 Basic setup .105 22.3 Setting a static adapter .106 23 Migration from Zend Framework 1 107 24 Namespacing Old Classes 109 24.1 Namespacing a ZFI Application 110 24.2 HOWTO Namespace Your Models 25 Running Zend Framework 2 and Zend Framework I in parallel 25.1 Use ZF2 in a ZFI project 113 25.2 Use ZFI in a ZF2 project 114 25. 3 Run ZFl and ZF2 together 114 26 Introduction to Zend \Authentication 117 26.1 Adapters “ ...117 26.2 Results .118 26.3 Identity Persistence 26. 4 Usage 122 27 Database Table authentication 125 27.1 Introduction 125 27.2 Basic Usage .125 27.3 Advanced Usage: Persisting a DbTable Result Object 128 28 Digest Authentication 13I 28.1 Introduction 131 28. 2 Specifics 131 28.3 Identity ...131 29 Http Authentication Adapter 133 29.1 Introduction 133 29.2 Design Overview .133 29.3 Configuration Options 134 29.4 Resolvers ,,134 29.5 Basic Usage 135 30 LDAP Authentication 137 30.1 Introduction 137 30.2 Usa 137 30. 3 The API 139 30.4 Server Options 30.5 Collecting Debugging Messages 142 30.6 Common Options for Specific Servers .142 31 Authentication validator 145 31.1 Introduction ...145 31.2 Basic Usage 145 32 Introduction to Zend \Barcode 147 33 Barcode creation using Zend \Barcode Barcode class 149 33 1 USing Zend\Barcode\Barcode: factory ...,,149 33.2 Drawing a barcode 150 33.3 Rendering a barcode .151 34 Zend Barcode\Barcode Objects 153 34.1 Common Options 153 34.2 Common Additional Getters 34.3 Description of shippe ed barcodes 155 35 Zend\Barcode renderers 163 35.1 Common Options 163 35.2 Zend \Barcode(Image 35.3 Zend\ Barcode\Renderer\Pdf 164 36 Zend\ Cache Storage \Adapter 165 36.1 Overview 165 36.2 Quick Start 165 36.3 Basic Configuration Options 166 36.4 The StorageInterface 166 36.5 The AvailableSpace Capablelnterface .168 36.6 The TotalSpace CapableInterface 168 36.7 The Clear By NamespaceInterface 169 36.8 The ClearBy PrefixInterface 169 36.9 The Clear ExpiredInterface 36. 10 The FlushableInterface 169 36.11 The iterableInterface 幽·面 169 36.12 The OptimizableInterface ....,.170 36.13 The TaggableInterface ...170 36.14 The Apc Adapter 170 36. 15 The Dba Adapter l71 36.16 The Filesystem Adapter ..172 36. 17 The Memcached Adapter ...173 36. 18 The Memory Adapte ...174 36.19 The Win Cache Adapter .175 36.20 The XCache Adapter ...,176 36.21 The ZendServerDisk Adapter ..177 36.22 The ZendServerShm Adapter 36.23 Examples ..178 37 Zend\ Cache lStorage \capabilities 181 37.1 Overview 18 37.2 Available methods 181 37.3 Examples 38 Zend\ Cache Storage\Plugin 185 38.1 Overview .185 38.2 Quick Start 185 38.3 The ClearExpiredBy Factor Plugin 186 38.4 The ExceptionHandler plu 186 38.5 The IgnoreUserAbort Plugin l86 38.6 The OptimizeBy Factor Plugin 186 38.7 The Serializer Plugin · ..187 38.8 Available methods 187 38.9 Examples· 39 Zend\ Cache\Pattern 189 39.1 Overview 39.2 Quick st 39.3 Available methods 190 40 Zend\ Cache Pattern\Callback Cache 191 40.1 Overview 191 40.2 Quick Start .,,,.,191 40.3 Configuration Options .191 40.4 Available methods .192 40.5 Examp 192 41 Zend\ cachePattern Class cache 193 41.1 Overview 193 41.2 Quick Start 193 41.3 Configuration Options 193 41.4 Available methods 194 41.5 Examples 194 42 Zend\ CachePattern \ obiect Cache 197 42.1 197 42.2 Quick Start · 197 42.3 Configuration Options 198 42. 4 Available methe 198 42.5 Example 3 Zend\Cache\Pattern Output Cache 201 43.1 Overview 201 43.2 Quick Start 201 43.3 Configuration Options ··: 201 43. 4 Available methods 201 43.5 Examples 202 44 Zend\CachelPattern(Capture Cache 203 44.1 Overview ....203 44.2 Quick Start ..203 44.3 Configuration Options 204 44 4 Available methods 2 44.5 Examples 205 45 Introduction to Zend \ Captcha 207 46 Captcha operation 09 47 CAPTCHA Adapters 211 47.1 Zend\ Captcha \Abstract Word .211 47.2 Zend(Captcha Dumb 212 47.3 Zend (Captcha\Figlet 47.4 Zend Captcha Image 212 47.5 Zend\\CaptchaReCaptcha 48 Introduction to Zend\ Config 215 48.1 USing Zend(ConfigConfig with a Reader Class ....215 48.2 Using Zend\ Config \Config with a PHP Configuration File 216 49 Theory of Operation 217 50 Zend\ Config Reader 219 50.1 Zend( Config \Reader\ 219 50.2 Zend(Config ReaderXml 50.3 Zend (Config Reader son .222 50.4 Zend(Config \Reader\Yaml 223 51 Zend\ Config\writer 225 51. 1 Zend\Configlwriter\Ini 225 51.2 Zend\ Config\Writer\Xml ...226 51.3 Zend\ Config Writer\Php Array 227 51. 4 Zend configlwriter son 228 51.5 Zend\ Configwriter\Yaml 52 Zend\ Config\Processor 231 52.1 Zend\ Config Processor\Constant 52.2 Zend\Config\Processor\Filter 232 52.3 Zend\ConfigProcessor\Queue 232 52.4 Zend\ (Config \ProcessorToken................ 233 52.5 Zend(Config \Processor\Translator 233 53 The Factory 235 53.1 Loading configuration file 235 53.2 Storing configuration file 54 Introduction to Zend\ Console 237 54.1 Writing console routes 237 54.2 Handling console requests 54.3 Adding console usage info 55 Console routes and routing 243 55 1 Router configuration 243 55.2 Basic route 244 55. 3 Catchall route 248 55, 4 Console routes cheat-sheet 249 56 Console-aware modules 251 56 1 Application banner 56.2 Usage information 253 56.3 Best practices 57 Console-aware action controllers 261 57.1 Handling console requests ·· ..261 57.2 Sending output to console 263 57. 3 Are we in a console? 264 57.4 Reading values from console parameters 265 58 Console adapt 269 58.1 Retrieving console adapter 58.2 USing console adapter 59 Console prompts 273 59.1 Confirm 274 59.2 Line 274 59.3 Cha 275 9. 4 Select 276 60 Introduction to Zend\Crypt 279 61 Encrypt/decrypt using block ciphers 62 Key derivation function 283 62.1 Pbkdf2 adapter 62.2 SaltedS2k adapter 28 62.3 Crypt 284 63 Password 287 63.1 Bcrypt 63.2 Apache 288 64 Public key cryptography 0 64.1 Diffie-Hellman 291 642 RSA 293 65 Zend \Db\Adapter 0 65.1 Creating an Ada 297 65.2 Creating an Adapter Using Dependency Injection 298 65.3 Query Preparation Through Zend Db\Adapter\Adapter: query .298 65.4 Query Execution Through Zend \Db Adapter\Adapter: query 65.5 Creating Statements 299 65.6 Using the Driver object ...299 65.7 USing The Platform Object 65.8 Using The Parameter Container ...302 65.9 Examples 303 66 Zend\Db\ResultSet 305 66.1 Quickstart ...305 66.2 Zend\Db\ResultSet\Result Set and Zend\Db\Result set\AbstractResult Set .306 66.3 Zend b ResultSet Hydrating Resultset 30 67 Zend sal 309 67.1 Zend\\sql\sql(Quickstart ,,,,,,,,,,,,,,,..309 67.2 ZendDbISql's Select, Insert, Update and Delete 310 67.3 Zend Dbsqlselect ,,,,,,,,,,,,,,.,,,310 67.4 Zend Dbsqlnsert ..313 67.5 Zend DbSqnupdate 314 67.6 Zend Dbisql\delete 314 67.7 Zend DbSqllWhere ZendwbiSqllHaving 314 68 Zend \Db\Sql\ddl 321 69 Creating Tables 323 70 Altering Tables 325 71 Dropping Tables 72 Executing DDL Statements 329 73 Currently Supported Data Types 331 74 Currently Supported Constraint Types 333 75 Zend \Db\TableGateway 335 75.1 Basic Usage 75.2 Table Gateway Features .337 76 Zend\Db\Row Gateway 76.1 Quickstart 339 76.2 ActiveRecord Style objects ..340 77 Zend\Db\Metadata 341 77.1 Basic usage .341 78 Introduction to zend\D 345 78.1 Dependency Injection 345 78.2 Dependency Injection Containers 345 79 Zend \Di Quickstart 347 80 Zend\Di definition 351 80.1 Definitionlist 80.2 RuntimeDefinition 80.3 CompilerDefinition 352 80.4 ClassDefinition 353 81 Zend \i InstanceManager 355 81.1 Parameters 81.2 Preferences 幽·面 356 81.3 Aliases .357 2 Zend \Di Configuration 83 Zend \Di Debugging Complex Use Cases 361 83.1 Debugging a DiC 83.2 Complex Use Cases 361 84 Introduction to Zend \Dom 365 85 Zend \Dom Query 307 8.5.1 Theory of Operation 367 85.2 Methods available 368 86 Introduction to Zend \ Escaper 371 86.1 Overview · 371 86.2 What Zend Escaper is not 372

...展开详情
试读 127P ZendFramework-2.2.5参考手册
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
zjs825787 超全面的帮助手册
2014-05-16
回复
losito 有点用不错
2014-03-21
回复
  • GitHub

    绑定GitHub第三方账户获取
关注 私信 TA的资源
上传资源赚积分or赚钱
    最新推荐
    ZendFramework-2.2.5参考手册 10积分/C币 立即下载
    1/127
    ZendFramework-2.2.5参考手册第1页
    ZendFramework-2.2.5参考手册第2页
    ZendFramework-2.2.5参考手册第3页
    ZendFramework-2.2.5参考手册第4页
    ZendFramework-2.2.5参考手册第5页
    ZendFramework-2.2.5参考手册第6页
    ZendFramework-2.2.5参考手册第7页
    ZendFramework-2.2.5参考手册第8页
    ZendFramework-2.2.5参考手册第9页
    ZendFramework-2.2.5参考手册第10页
    ZendFramework-2.2.5参考手册第11页
    ZendFramework-2.2.5参考手册第12页
    ZendFramework-2.2.5参考手册第13页
    ZendFramework-2.2.5参考手册第14页
    ZendFramework-2.2.5参考手册第15页
    ZendFramework-2.2.5参考手册第16页
    ZendFramework-2.2.5参考手册第17页
    ZendFramework-2.2.5参考手册第18页
    ZendFramework-2.2.5参考手册第19页
    ZendFramework-2.2.5参考手册第20页

    试读结束, 可继续阅读

    10积分/C币 立即下载 >