php面向对象技术全面讲解PHP objectoriented technology comprehensive explanation.docx
- 文档编号:2369458
- 上传时间:2022-10-29
- 格式:DOCX
- 页数:6
- 大小:17.80KB
php面向对象技术全面讲解PHP objectoriented technology comprehensive explanation.docx
《php面向对象技术全面讲解PHP objectoriented technology comprehensive explanation.docx》由会员分享,可在线阅读,更多相关《php面向对象技术全面讲解PHP objectoriented technology comprehensive explanation.docx(6页珍藏版)》请在冰豆网上搜索。
php面向对象技术全面讲解PHPobjectorientedtechnologycomprehensiveexplanation
php面向对象技术(全面讲解)(PHPobject-orientedtechnology(comprehensiveexplanation))
Thissectionincludesthefollowingtechnicalpoints:
1.objectorientedconcepts
2.whatisaclass,whatisanobject,aclass,andanobject?
3.whatisobjectorientedprogramming?
4.howdoyouabstractaclass?
5.howdoyouinstantiateobjects?
6.howdoyouusemembersofanobject?
7.useofthespecialreference"$this"
8.constructionmethodsandmethodsofanalysis
9.encapsulation
Theapplicationoffourmethods,10.__set(),__get(),__isset(),and__unset()
11.typesofsuccession
12.polymorphicapplications
13.overloadingnewmethods
14.accesstype
15.useofstaticmembers
Theapplicationofthe16.finalkeyword
17.__toString()method
18.clones
19.__callprocessingcallerror
20.autoloadingclass
21.serializationofobjects
22.abstractmethodsandabstractclasses
23.php5interfacetechnology
1.objectorientedconcepts
Objectorientedprogramming(ObjectOriented,Programming,OOP,objectorientedprogramming)isaprogrammingframework,abasicprincipleofOOPisacomputerprogramthatisasingleunitorcanplayaroleandobjectcombinationsubroutine,OOPtoachievethethreegoalsofthesoftwareengineering,reusability,flexibilityandextensionof.Inordertoimplementthewholeoperation,eachobjectisabletoreceiveinformation,processdataandsendinformationtootherobjects.Objectorientedhasbeenahottopicinthefieldofsoftwaredevelopment.Firstofall,objectorientedisconsistentwiththegeneralrulesofhumanbeings.Secondly,usingobjectorientedmethodcanmakeeachpartofthesystem,leteachpersondohisbest.Openthedoorforprogrammerstomaketheirprogrammingcodemoreconcise,easiertomaintain,andmorereusable.ItistruethatsomepeoplesaythatPHPisnotarealobjectorientedlanguage.PHPisamixedlanguage,youcanuseOOP,oryoucanusetraditionalproceduralprogramming.However,forlargeprojects,youmightneedtousepureOOPtodeclareclassesinPHP,anduseonlyobjectsandclassesinyourproject.Idon'tsaymuchaboutthisconcept,becausethemainreasonwhymanyfriendsstayawayfromobjectorientedprogrammingisthatwhenyoutouchtheobjectorientedconcept,youdon'tunderstandit,soyoudon'twanttolearnit.Waituntilthereaderhasreadthewholecontent,andthengotounderstandtheconcept.
2.whatisaclass,whatisanobject,aclass,andanobject?
Classconcept:
aclassisacollectionofobjectswiththesameattributesandservices.Itprovidesaunifiedabstractdescriptionofallobjectsbelongingtothatclass,includingtwomainparts:
attributesandservices.Inobjectorientedprogramminglanguages,aclassisaseparateunitofprocedurethatshouldhaveaclassnameandincludetwomainsections:
attributedescriptionsandservicedescriptions.
Theconceptofanobject:
anobjectisanentityusedinthesystemtodescribeobjectivethings.Itisabasicunitofasystem.Anobjectconsistingofasetofattributesandasetofservicesthatoperateonthissetofattributes.Fromamoreabstractpointofview,theobjectistheproblemdomainorachievesomethingsinthedomainofanabstract,itreflectsthethingsthatneedtobestoredintheinformationinthesystemandplayarole;itisasetofattributesandagroupoftherighttooperatethesepropertiesofthepackage.Theobjectiveworldismadeupoftheconnectionbetweentheobjectandtheobject.
Therelationshipbetweenclassesandobjectsisliketherelationbetweenthedieandthecasting.Theinstantiationoftheclassresultsintheobject,andtheabstractionofaclassistheclass.Aclassdescribesasetofobjectswiththesamecharacteristics(attributes)andthesamebehavior(Methods).
Theaboveisaboutthedefinitionofit,maybeyouarejustcontactobjectorientedfriends,don'tbeconfusedabouttheconceptofthings,letmegiveyouanexample,ifthePCyougotoZhongguancuntobuyseveralassembly,wherethefirststepyouhavetodowhatisnotinstalledinengineeringteacherandyousittogether,accordingtotheinformationyouprovideandyoucompleteasingleinstalledconfiguration.Thisconfigurationcanbeassumedtobesingle,itisapieceofpaper,butitrecordsthePCmachineyouwanttobuytheinformation,ifyouusethisconfigurationtobuy10singlemachineso,these10machinesareaccordingtotheconfigurationofsinglecomponent,sothatthe10machineisatype,butalsocanbesaidtobeaclass.Sowhatisanobject?
Theinstantiationofaclassistheobject,andthemachineisconfiguredwiththisconfigurationsheet(instantiated)istheobject,theentitythatwecanoperate,10machines,and10objects.Eachmachineisindependent,onlythattheyareofthesameclass,theother
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- php面向对象技术全面讲解PHP objectoriented technology comprehensive explanation php 面向 对象 技术 全面 讲解
链接地址:https://www.bdocx.com/doc/2369458.html