Object Oriented Programming PHP
For orignial post kindly visit www.apepoint.com
Object oriented programming is the dominant programming paradigm these days, having replaced the "structured procedure based programming techniques".
In oop the program is made of objects, with certain properties and operations that the object can perform oop reverses the order and puts data first then looks at the algorihms that seperates on the data
once you understand the oop concept I ensure you that the developing a big projects will be an ordinary task for you I must write haere that if you are developing an application that is small and you can develop alone then you can go for procedure programming but if your application is big and in tean no of peoples are plural so you must use this befor moving any example is i recommend you to under stand some more concepts
Classes
A class definition begins with the keyword class followed by whatever name assign to it and variable and methods within braces.
Properties and method
when we define a class we define some of the variable's inside that are accessible in its functions are knowns as properties. These variable maintain the state of object.
In class as variable are define we define function these function are called methods they are aas a method for communicating with and manipulating the data within the object Methods provided the object with a standard interface that any one can use.
Public Private
The visibility of the properties and methods of a class can be set as public or provate. Those that are marked wiht the private keywork are only accessibel from within the class itself . Those marked with the public keywork on the other hand are accessible from both inside and outside of the class.
Constructors and Destructors
In some cases we need to initialize the some of properties of a class we can do it by using constructors they are methods which are written inside class define and the name of this method is same as class name.
In some cases we want to close some resources before moving from that class object we can do so by using destructors.
Example
class MyDestructableClass {
function MyDestructableClass () {
print "In constructor\n";
$this->name = "MyDestructableClass";
}
function __destruct() {
print "Destroying " . $this->name . "\n";
}
}
$obj = new MyDestructableClass();
?>
here in above example method function MyDestructableClass () { } is a constructor and the another method is a Destructors
For more example kindly click on the link script tute from main menu.
In this i explained about the visitors tracking by using php mysql
Popular Posts
-
Form processing in PHP kindly visit www.apepoint.com for the original content of this blog Before moving to this chapter i must sug...
-
PHP basis programming kindly visit www.apepoint.com for the original content of this blog. Here in this chapter we will learn how t...
-
For orignial post kindly visit www.apepoint.com File manager A file manager or file browser is a computer program that provides a user inter...
-
For orignial post kindly visit www.apepoint.com When we work with MySQL we need to execute a number of query .We can execute almost all t...
-
On window Here the process is straight forward just download WAMP server and double click it will automatically install and you can run you ...
-
Object Oriented Programming PHP For orignial post kindly visit www.apepoint.com Object oriented programming is the dominant programming para...
-
PHP: Hypertext Preprocessor is a widely used, general-purpose scripting language that was originally designed for web development to produce...
-
For orignial post kindly visit www.apepoint.com for the original contents kindly visit www.apepoint.com Session support in PHP consists of a...
-
PHP array In c like language we all studied that an array is a collection of similar elements. These similar elements could be all int or ...
-
For orignial post kindly visit www.apepoint.com In a number of website you might have seen that the gadget which says that your IP Addres...
No comments:
Post a Comment