Soumettre la recherche
Mettre en ligne
Oop in php lecture 2
•
Télécharger en tant que PPT, PDF
•
0 j'aime
•
424 vues
Mudasir Syed
Suivre
Oop in php lecture 2
Lire moins
Lire la suite
Formation
Signaler
Partager
Signaler
Partager
1 sur 6
Télécharger maintenant
Recommandé
Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5
prakash185645
iOS development introduction
iOS development introduction
paramisoft
Final keyword
Final keyword
Namrata_Thakare
Abap Objects for BW
Abap Objects for BW
Luc Vanrobays
Lecture13 abap on line
Lecture13 abap on line
Milind Patil
Object oriented programming in java
Object oriented programming in java
Elizabeth alexander
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
cesarmendez78
Features of java - javatportal
Features of java - javatportal
JavaTportal
Recommandé
Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5
prakash185645
iOS development introduction
iOS development introduction
paramisoft
Final keyword
Final keyword
Namrata_Thakare
Abap Objects for BW
Abap Objects for BW
Luc Vanrobays
Lecture13 abap on line
Lecture13 abap on line
Milind Patil
Object oriented programming in java
Object oriented programming in java
Elizabeth alexander
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
cesarmendez78
Features of java - javatportal
Features of java - javatportal
JavaTportal
Beginners Guide to Object Orientation in PHP
Beginners Guide to Object Orientation in PHP
Rick Ogden
Final keyword in java
Final keyword in java
Hitesh Kumar
Jsp tag library
Jsp tag library
sandeep54552
Javascript Road Trip(es6)
Javascript Road Trip(es6)
Ahmed Assaf
Functions in sap hana
Functions in sap hana
kabilarasan R
Learn To Code: Introduction to c
Learn To Code: Introduction to c
SadhanaParameswaran
Java Chapter 04 - Writing Classes: part 2
Java Chapter 04 - Writing Classes: part 2
DanWooster1
Ajax
Ajax
Mudasir Syed
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
Mudasir Syed
PHP mysql Sql
PHP mysql Sql
Mudasir Syed
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Mudasir Syed
Cookies in php lecture 2
Cookies in php lecture 2
Mudasir Syed
Web forms and html lecture Number 5
Web forms and html lecture Number 5
Mudasir Syed
Error reporting in php
Error reporting in php
Mudasir Syed
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Mudasir Syed
Php Mysql
Php Mysql
Mudasir Syed
Time manipulation lecture 1
Time manipulation lecture 1
Mudasir Syed
PHP mysql Er diagram
PHP mysql Er diagram
Mudasir Syed
Cookies in php lecture 1
Cookies in php lecture 1
Mudasir Syed
PHP mysql Database normalizatin
PHP mysql Database normalizatin
Mudasir Syed
Reporting using FPDF
Reporting using FPDF
Mudasir Syed
Sql select
Sql select
Mudasir Syed
Contenu connexe
Tendances
Beginners Guide to Object Orientation in PHP
Beginners Guide to Object Orientation in PHP
Rick Ogden
Final keyword in java
Final keyword in java
Hitesh Kumar
Jsp tag library
Jsp tag library
sandeep54552
Javascript Road Trip(es6)
Javascript Road Trip(es6)
Ahmed Assaf
Functions in sap hana
Functions in sap hana
kabilarasan R
Learn To Code: Introduction to c
Learn To Code: Introduction to c
SadhanaParameswaran
Java Chapter 04 - Writing Classes: part 2
Java Chapter 04 - Writing Classes: part 2
DanWooster1
Tendances
(7)
Beginners Guide to Object Orientation in PHP
Beginners Guide to Object Orientation in PHP
Final keyword in java
Final keyword in java
Jsp tag library
Jsp tag library
Javascript Road Trip(es6)
Javascript Road Trip(es6)
Functions in sap hana
Functions in sap hana
Learn To Code: Introduction to c
Learn To Code: Introduction to c
Java Chapter 04 - Writing Classes: part 2
Java Chapter 04 - Writing Classes: part 2
En vedette
Ajax
Ajax
Mudasir Syed
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
Mudasir Syed
PHP mysql Sql
PHP mysql Sql
Mudasir Syed
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Mudasir Syed
Cookies in php lecture 2
Cookies in php lecture 2
Mudasir Syed
Web forms and html lecture Number 5
Web forms and html lecture Number 5
Mudasir Syed
Error reporting in php
Error reporting in php
Mudasir Syed
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Mudasir Syed
Php Mysql
Php Mysql
Mudasir Syed
Time manipulation lecture 1
Time manipulation lecture 1
Mudasir Syed
PHP mysql Er diagram
PHP mysql Er diagram
Mudasir Syed
Cookies in php lecture 1
Cookies in php lecture 1
Mudasir Syed
PHP mysql Database normalizatin
PHP mysql Database normalizatin
Mudasir Syed
Reporting using FPDF
Reporting using FPDF
Mudasir Syed
Sql select
Sql select
Mudasir Syed
PHP mysql Mysql joins
PHP mysql Mysql joins
Mudasir Syed
Time manipulation lecture 2
Time manipulation lecture 2
Mudasir Syed
Oop in php lecture 2
Oop in php lecture 2
Mudasir Syed
Form validation server side
Form validation server side
Mudasir Syed
Form validation with built in functions
Form validation with built in functions
Mudasir Syed
En vedette
(20)
Ajax
Ajax
PHP mysql Installing my sql 5.1
PHP mysql Installing my sql 5.1
PHP mysql Sql
PHP mysql Sql
Web forms and html lecture Number 2
Web forms and html lecture Number 2
Cookies in php lecture 2
Cookies in php lecture 2
Web forms and html lecture Number 5
Web forms and html lecture Number 5
Error reporting in php
Error reporting in php
Adminstrating Through PHPMyAdmin
Adminstrating Through PHPMyAdmin
Php Mysql
Php Mysql
Time manipulation lecture 1
Time manipulation lecture 1
PHP mysql Er diagram
PHP mysql Er diagram
Cookies in php lecture 1
Cookies in php lecture 1
PHP mysql Database normalizatin
PHP mysql Database normalizatin
Reporting using FPDF
Reporting using FPDF
Sql select
Sql select
PHP mysql Mysql joins
PHP mysql Mysql joins
Time manipulation lecture 2
Time manipulation lecture 2
Oop in php lecture 2
Oop in php lecture 2
Form validation server side
Form validation server side
Form validation with built in functions
Form validation with built in functions
Similaire à Oop in php lecture 2
12.2 Abstract class and Interface.ppt
12.2 Abstract class and Interface.ppt
VISHNUSHANKARSINGH3
J2EE vs JavaEE
J2EE vs JavaEE
eanimou
JSP Directives
JSP Directives
ShahDhruv21
SMI - Introduction to Java
SMI - Introduction to Java
SMIJava
java.pptx
java.pptx
PRASHANTKULKARNI133
Java interfaces
Java interfaces
Sujit Kumar
What is Interface in Java | How to implement Multiple Inheritance Using Inter...
What is Interface in Java | How to implement Multiple Inheritance Using Inter...
Edureka!
Unit 2 Fundamentals of React -------.pptx
Unit 2 Fundamentals of React -------.pptx
krishitajariwala72
Intro to java 8
Intro to java 8
John Godoi
Understanding And Using Reflection
Understanding And Using Reflection
Ganesh Samarthyam
Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)
Ryan Mauger
Webinar: Zend framework Getting to grips (ZF1)
Webinar: Zend framework Getting to grips (ZF1)
Ryan Mauger
Java interfaces
Java interfaces
Elizabeth alexander
OOFeatures_revised-2.pptx
OOFeatures_revised-2.pptx
ssuser84e52e
Drupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
Shabir Ahmad
The smartpath information systems java
The smartpath information systems java
The Smartpath Information Systems,Bhilai,Durg,Chhattisgarh.
Concurrency Programming in Java - 02 - Essentials of Java Part 1
Concurrency Programming in Java - 02 - Essentials of Java Part 1
Sachintha Gunasena
Creational Design Patterns
Creational Design Patterns
Jamie (Taka) Wang
Comparison of different access controls
Comparison of different access controls
Rashmi Nair
Jdbc
Jdbc
DeepikaT13
Similaire à Oop in php lecture 2
(20)
12.2 Abstract class and Interface.ppt
12.2 Abstract class and Interface.ppt
J2EE vs JavaEE
J2EE vs JavaEE
JSP Directives
JSP Directives
SMI - Introduction to Java
SMI - Introduction to Java
java.pptx
java.pptx
Java interfaces
Java interfaces
What is Interface in Java | How to implement Multiple Inheritance Using Inter...
What is Interface in Java | How to implement Multiple Inheritance Using Inter...
Unit 2 Fundamentals of React -------.pptx
Unit 2 Fundamentals of React -------.pptx
Intro to java 8
Intro to java 8
Understanding And Using Reflection
Understanding And Using Reflection
Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)
Webinar: Zend framework Getting to grips (ZF1)
Webinar: Zend framework Getting to grips (ZF1)
Java interfaces
Java interfaces
OOFeatures_revised-2.pptx
OOFeatures_revised-2.pptx
Drupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
The smartpath information systems java
The smartpath information systems java
Concurrency Programming in Java - 02 - Essentials of Java Part 1
Concurrency Programming in Java - 02 - Essentials of Java Part 1
Creational Design Patterns
Creational Design Patterns
Comparison of different access controls
Comparison of different access controls
Jdbc
Jdbc
Plus de Mudasir Syed
Filing system in PHP
Filing system in PHP
Mudasir Syed
PHP mysql Introduction database
PHP mysql Introduction database
Mudasir Syed
PHP mysql Aggregate functions
PHP mysql Aggregate functions
Mudasir Syed
Form validation client side
Form validation client side
Mudasir Syed
Javascript lecture 4
Javascript lecture 4
Mudasir Syed
Javascript lecture 3
Javascript lecture 3
Mudasir Syed
Javascript 2
Javascript 2
Mudasir Syed
Java script lecture 1
Java script lecture 1
Mudasir Syed
Dom in javascript
Dom in javascript
Mudasir Syed
Functions in php
Functions in php
Mudasir Syed
PHP array 2
PHP array 2
Mudasir Syed
PHP array 1
PHP array 1
Mudasir Syed
Plus de Mudasir Syed
(12)
Filing system in PHP
Filing system in PHP
PHP mysql Introduction database
PHP mysql Introduction database
PHP mysql Aggregate functions
PHP mysql Aggregate functions
Form validation client side
Form validation client side
Javascript lecture 4
Javascript lecture 4
Javascript lecture 3
Javascript lecture 3
Javascript 2
Javascript 2
Java script lecture 1
Java script lecture 1
Dom in javascript
Dom in javascript
Functions in php
Functions in php
PHP array 2
PHP array 2
PHP array 1
PHP array 1
Dernier
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
sqpmdrvczh
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
RaymartEstabillo3
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
SherlyMaeNeri
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
NirmalaLoungPoorunde1
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
nelietumpap1
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
Celine George
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
Dr. Mazin Mohamed alkathiri
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
pboyjonauth
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
MIPLM
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
pboyjonauth
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
AadityaSharma884161
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
phamnguyenenglishnb
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
LeaCamillePacle
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
National Information Standards Organization (NISO)
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
Ashokrao Mane college of Pharmacy Peth-Vadgaon
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
SpandanaRallapalli
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Celine George
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
Jisc
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Celine George
Dernier
(20)
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Oop in php lecture 2
1.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Interface • Interface is an empty class which contains only the declaration of methods. • So any class which implements this interface must contain the declared functions in it. • Interface is nothing but a strict ruling, which helps to extend any class and strictly implement all methods defined in interface. • A class can use any interface by using the implements keyword. • In interface you can only declare methods, but you cannot write their body. • That means the body of all methods must remain blank. • One of the reasons is it implies strict rules while creating a class.
2.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Interface Cont… <? //interface.dbdriver.php interface DBDriver { public function connect(); public function execute($sql); } ?> • Did you notice that the functions are empty in an interface? Now let's create our MySQLDriver class, which implements this interface. <? //class.mysqldriver.php include("interface.dbdriver.php"); class MySQLDriver implements DBDriver { } ?> • Now if you execute the code above, it will Fatal error, since we have not implemented all methods in child class.
3.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Interface Cont… <? include("interface.dbdriver.php"); class MySQLDriver implements DBDriver { public function connect() { //connect to database } public function execute($query) { //execute the query and output result } } ?> • Let's rewrite our MySQLDriver class as follows.
4.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Abstract Classes • An abstract class is almost the same as interface. • Except that now the methods can contain body. • An abstract class must also be "extended", not "implemented". • If the extended classes have some methods with common functionalities, then you can define those functions in an abstract class. <? //abstract.reportgenerator.php abstract class ReportGenerator { public function generateReport($resultArray) { //write code to process the multidimensional result array and //generate HTML Report } } ?>
5.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Abstract Classes Cont… • Please note that we can use the abstract class and implement an interface. • Similar to declaring a class as abstract, you can also declare any method as abstract. • When a method is declared as abstract, it means that the subclass must override that method. <? include("interface.dbdriver.php"); include("abstract.reportgenerator.php"); class MySQLDriver extends ReportGenerator implements DBDriver { public function connect() { //connect to database } public function execute($query) { //execute the query and output result } / / you need not declare or write the generateReport method here you need not declare or write the generateReport method here //again as it is extended from the abstract class directly." } ?>
6.
© Copyright 2012
Hidaya Trust (Pakistan) ● A Non-Profit Organization ● www.hidayatrust.org / www,histpk.org Abstract Classes Cont… • Please note that we can use the abstract class and implement an interface. • Similar to declaring a class as abstract, you can also declare any method as abstract. • When a method is declared as abstract, it means that the subclass must override that method. <? include("interface.dbdriver.php"); include("abstract.reportgenerator.php"); class MySQLDriver extends ReportGenerator implements DBDriver { public function connect() { //connect to database } public function execute($query) { //execute the query and output result } / / you need not declare or write the generateReport method here you need not declare or write the generateReport method here //again as it is extended from the abstract class directly." } ?>
Télécharger maintenant