What Is OOP System.
Object Oriented Programming Language is basically a set of rules and concepts which makes it easy to understand and manage. Class's , inheritances , constructor, destructor, abstractor class are the concept provided by OOPS.
Class :-
In case of OOPS a Class is a collection of Data Member (Variables, Properties ) and Member Function (Called Function or Methods). Data members are used to store the Information where member function are used to operate the Data Member's. In case of PHP member of classes have friendly accessifier , however one can define the explicitly with one of the these Access- modifier:-
- Private :- The members which one defined as private keyword , only accessible within the class, No one can access them outside of the Class , even Object of the Class.
- Public:- The member which one are defined as Public Keyword can be accessed within a Class and outside of the Class. Those member function can be accessed with object of that class or with class name depends upon access-modifier.
- Protected:- Protected member function like as private member but protect functions can be inherited one level down while private are not.
Syntax For the Class :-
class <class name >
{
Public $datamember; // In this section we can defile data member as Private, Public or Protected.
public function <function name(method)>
{
//code to operate the data member's goes here.
}
}
To be Continued .........Objects