Submit Search
Upload
Oop in php lecture 2
•
Download as PPT, PDF
•
0 likes
•
424 views
Mudasir Syed
Follow
Oop in php lecture 2
Read less
Read more
Education
Report
Share
Report
Share
1 of 6
Download now
Recommended
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
Â
Recommended
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
Â
More Related Content
What's hot
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
Â
What's hot
(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
Â
Viewers also liked
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
Â
Viewers also liked
(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
Â
Similar to 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
Â
Similar to 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
Â
More from 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
Â
More from 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
Â
Recently uploaded
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Â
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
manuelaromero2013
Â
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
Dr. Mazin Mohamed alkathiri
Â
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
JhezDiaz1
Â
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Celine George
Â
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
JonathanParaisoCruz
Â
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
pboyjonauth
Â
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
RaymartEstabillo3
Â
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
CapitolTechU
Â
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
thorishapillay1
Â
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
UnboundStockton
Â
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
Eyham Joco
Â
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
Sabitha Banu
Â
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Â
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
JiesonDelaCerna
Â
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
YousafMalik24
Â
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
mkooblal
Â
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
arsicmarija21
Â
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
Celine George
Â
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
Sayali Powar
Â
Recently uploaded
(20)
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Â
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
Â
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
Â
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
Â
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
Â
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
Â
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
Â
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
Â
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
Â
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Â
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
Â
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
Â
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
Â
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Â
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
Â
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
Â
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
Â
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
Â
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
Â
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
Â
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." } ?>
Download now