实例介绍
PHP Objects Patterns and Practice(5th) 英文无水印pdf 第5版 pdf使用FoxitReader和PDF-XChangeViewer测试可以打开
PHP Objects, Patterns, and Practice Matt zandstra Liverpool, Merseyside United Kingdom ISBN-13(pbk):978-1-4842-1995-9 ISBN-13( electronic):978-1-4842-1996-6 DOI10.1007/978-1-4842-1996-6 Library of Congress Control Number: 2016961297 Copyright o 2016 by matt Zandstra This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein Managing Director: Welmoed Spahr Acquisitions Editor Louise Corrigan Technical Reviewer: Paul Tregoing Editorial Board Steve anglin, Pramila balan, Laura berendson, Aaron black, louise corrigan Jonathan Gennick, Todd Green, Robert Hutchinson, Celestin Suresh John, Nikhil Karkal James Markham, Susan McDermott, Matthew Moodie, Natalie Pao, Gwenan Spearing Coordinating Editor: Nancy Chen Copy Editor Patrick Meador Compositor: SPi Global Indexer: SPi Global Artist: SPi Global, image courtesy of Freepik Distributed to the book trade worldwide by Springer Science+ Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505, e-mailorders-ny@springer-sbm.comorvisitwww.springercom.ApressmEdia,LlcisaCalifornia LLC and the sole member (owner )is Springer Science Business Media Finance Inc( SsBM Finance Inc) SSBM Finance inc is a delaware corporation Forinformationontranslationspleasee-mailrights@apress.com,orvisitwww.apress.com press and friends of ed books may be purchased in bulk for academic, corporate, or promotional use. Book versions and licenses are also available for most titles. For more information, reference our Special BulkSales-ebookLicensingwebpageatwww.apress.com/bulk-sales Any source code or other supplementary materials referenced by the author in this text are available to readersatwww.apress.comFordetailedinformationabouthowtolocateyourbookssourcecodegoto Www.apress. com/source-code/. Readers can also access source code at Springerlink in the Supplementary Material section for each chapter Printed on acid-free paper For Louise, who is the whole point. Contents at a glance About the author About the tecnical reviewer Acknowledgments XXV Introduction xxvii Part l: Objects Chapter 1: PHP: Design and Management ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 139 Chapter 2: PHP and objects Chapter 3: Object Basics ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 15 Chapter 4: Advanced Features 47 Chapter 5: object Tools.amont ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 99 Chapter 6: Objects and design 133 Part l: patterns ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 155 Chapter 7: what are design patterns why use them? 157 Chapter 8: Some Pattern Principles ram 165 Chapter9: Generating0 bjects,,,,,,,,…,,,…,,…,179 Chapter 10: Patterns for Flexible Object Programming amm mmm 211 Chapter 11: Performing and Representing Tasks a amanI 235 Chapter 12: Enterprise Patterns ga277 Chapter 13: Database Patterns.mmmm RRa aRa amanI 327 CONTENTS AT A GLANC Part li practice ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 375 Chapter14Good( and Bad) Practice,,,,,…,,,,……377 Chapter 15: PHP Standards mmmmmammmmammmnmmmnn 385 Chapter 16: PHP Using and creating Components with Composer mmmmmmammaa 399 Chapter 17: Version Control with gitar Chapter 18: Testing with PhPUnit R RRIRIRRERIREIIIERIRIan: 435 Chapter 19: Automated Build with Phing 465 Chapter 20: Vagrant. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 487 ■ Chapter21: Continuous Integration,,,,,,…,,,,m,m,…,497 Chapter 22: Objects Patterns, Practice .stamm EaREastamEIIREaIIaIn 525 Chapter23: Appendix A: Bibliography…,…,,,…,,,…,,,,,,535 Chapter 24: Appendix B: A simple Parser amat 539 Index g565 Contents About the author xxI About the tecnical reviewer Acknowledgments ■■■■■■■■■■ XXV Introduction mmmmmmxxvii Part l: Objects Chapter 1: PHP: Design and Management a ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■ 3 The problem 3 PHP and Other Languages About This book 6 Objects Patterns∴… 6 Practice. What's new in the fifth edition Summary 8 Chapter 2: PHP and objects. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■ 9 The Accidental Success of PHP objects 9 In the Beginning: Syntactic Sugar PhP 3 PHP 4 and the Quiet Revolution Change Embraced: PHP 5.................................... PHP7: Closing the Gap.…...........………,12 Advocacy and Agnosticism: The object debate DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDm 12 Summary…13 CONTENTS Chapter 3: Object 15 Classes and objects ,15 A First class m....mm. 15 A First object (or Two ,16 Setting Properties in a class 17 Working with Methods… 19 Creating a Constructor Method........... Arguments and Types 22 Primitive Types Taking the Hint: object Types..................................26 Inheritance 30 TheInheritanceProb|em∴.30 Working with Inher 35 Public, Private, and Protected: Managing Access to Summary 46 Chapter 4: Advanced Features amamamammaamammamaa. 47 Static Methods and properties.ameemsameemnaneemnanem. 47 Constant Properties.............. 51 Abstract classes 51 interfaces 53 Traits. A Problem for traits to solve Defining and Using a trait...........,………………………,57 Using more than one trait…...….…….58 Combining traits and Interfaces. Managing Method Name Conflicts with insteadof..,.,.……………59 Aliasing overridden trait methods 61 Using static methods in traits 61 CONTENTS Accessing Host class properties............................... Defining Abstract Methods in Traits Changing Access Rights to Trait Methods.............. ,64 Late Static Bindings: The static Keyword DDDDDDDDDDDDDDDDDDD ,65 Handling Errors 68 EXceptions….,,… Final classes and methods The internal error class 0789 Working with Interceptors DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD Defining Destructor Methods . Copying objects with cloned..... 87 Defining String Values for Your objects 90 Callbacks, Anonymous Functions, and Closures 91 nonymous Classes 95 Summary 97 Chapter 5: object Tools ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 99 PHP and packages 99 PHP Packages and Namespaces Autoload 108 The class and object Functions 12 L00 king for classes…....,...……,113 earning about an object or Class 113 Getting a Fully Qualified String Reference to a Class Learning About meth0ds..,,,,,,………,………………115 earning About Properties Learning about Inheritance…......………….,117 Method invocati0n…118 CONTENTS The reflection APl ,119 Getting Started Time to Roll up Your Sleeves... 120 EXamining a Class…...................,…………122 EXamining Methods 124 xamining Method Arguments 126 Using the reflection APl 127 Summary….................…131 Chapter 6: Objects and design ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 133 Defining Code Design. object-Oriented and Procedural Programming . Responsibility…......,,………………………138 Cohesion ,日面a面面面a,日面面a日面面面面日面面量a日面面面日面 138 Coupling 0 orthogonality...,.,.,.,.…,.….,……..,139 Choosing Your Classes. Polymorphism 140 Encapsulation 142 F0 rget How to Do It...,,,,…… 142 Four Signposts 143 Code Duplication.............................143 The class who knew too much 143 The jack of all trades 面量a日面日面面面量a日面日面a面面面a日面日面面面,日面面日面面面面,日面面日面面面面日面面量日面面面Ba日面 144 Conditional statements 144 The UMl 144 Class Diagrams..................... 144 Sequence Diagrams .................................................................................................151 Summary . ,153 【实例截图】
【核心代码】
标签:
相关软件
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论