资源描述:
《[Learning.PHP.Design.Patterns(2013.2)].William.Sanders.文字版》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、LearningPHPDesignPatternsWilliamSandersLearningPHPDesignPatternsbyWilliamSandersCopyright©2013WilliamB.Sanders.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’Reillybooksmayb
2、epurchasedforeducational,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutionalsalesdepartment:800-998-9938orcorporate@oreilly.com.Editors:MariaGulicka
3、ndRachelRoumeliotisProofreader:BeccaFreedProductionEditor:MelanieYarbroughIndexer:FredBrownCopyeditor:JasmineKwitynCoverDesigner:KarenMontgomeryInteriorDesigner:DavidFutatoIllustrator:RebeccaDemarestFebruary2013:FirstEditionRevisionHistoryfortheFirstEdition
4、:2013-02-08FirstreleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=9781449344917forreleasedetails.NutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,Inc.LearningPHPDesignPatterns,thecoverimageofanAlaskaplaice
5、,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatrade‐markclaim,thedesignationsh
6、avebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedherein.ISBN:978-1-449-34491-7[LSI]Inmemoryof
7、myfather,WilliamB.Sanders(1917–2012).TableofContentsPreface......................................................................xiiiPartI.EasingintotheFundamentalsofDesignPatterns1.PHPandObject-OrientedProgramming........................................5En
8、teringintoIntermediateandAdvancedProgramming5WhyObject-OrientedProgramming?6MakingProblemSolvingEasier6Modularization7ClassesandObjects8SingleResponsibilityPrinciple8ConstructorFunctionsinPHP9TheClient