Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
Php
Class 203 codes
Home
Php
Class
1 $this keyword refers to the instance from within the class definition
2 __autoload( ) is called whenever you try to create an object of a class that hasnt been defined
3 __autoload() function automatically includes a class file
4 __call
5 __call( ) method is called if PHP fails to find the method
6 __get( ) specifies what to do if an unknown property is read from within your script
7 __set( ) method is called whenever an undefined property is set in your scripts
8 __sleep() method is called by serialize() before it packs up the object
9 __toString( ) set a string value for the object that will be used if the object is ever used as a string
10 __wakeup() is called by unserialize()
11 A Basic PHP 4 Class
12 A Basic PHP 5 Class
13 A class is a collection of variables and functions working with these variables
14 A Class with a Constructor
15 A Class with a Method
16 A Class with Public Properties
17 A Sample Interface
18 Abstract class demo
19 Abstract keyword is used to say that a method or class cannot be created in your program as it stands
20 Access private properties with for each loop
21 Access properties
22 Accessing a Property from Within a Method
23 Accessing Attributes of Objects
24 Accessing instance-specific data within a destructor
25 Accessing the $age variable using this-
26 Accessing the Attributes of a Class by Using Functions
27 Adding a Constructor to PriceItem
28 Adding Properties
29 Adding the $age variable to Cat
30 Aggregating an address object
31 Assign default property value
32 Automatically Loading Include Files with ___autoload()
33 Basic Inheritance
34 Basic Object Accessing
35 Bird class
36 Book class
37 Call class method dynamically
38 Call class methods directly
39 Call getter to get value for property
40 Call_user_func
41 Calling an Overridden Method
42 Calling an Overridden Method (PHP 5 Syntax)
43 Calling the constructor of the parent class
44 Change class instance after clone
45 Changing the member $a to protected or private
46 Changing the Value of a Property from Within a Method
47 Changing the Value of an Attribute within a Function
48 Class Constant
49 Class destructors
50 Class Inheritance
51 Class including a complete collection of get and set methods
52 Class information
53 Class inheritance in action
54 Class Member and Method Definitions
55 Class Member Binding in PHP
56 Class Member Overloading
57 Class member variable access
58 Class members visibility
59 Class method info
60 Class method override Demo
61 Class static properties
62 Class toString
63 Class Type Hints
64 Class using access control
65 Class with destructors
66 Class_exists
67 Cleaning Up with the __destruct Method (PHP 5 Only)
68 Clone a class
69 Clone class instance
70 Cloning an aggregated class
71 Comparing Objects with == and ===
72 Constant definition is considered a static member of the class
73 Constructors and Destructors
74 Controlling Access to Class Members
75 Controlling serialization using __sleep() and __wakeUp()
76 Convert variables from arrays to objects and back again
77 Copying Objects
78 Counting the elements in an array
79 Create a new class and create an instance then use its property and method
80 Create Class instance
81 Create two child classes
82 Creating a Class That Inherits from Another
83 Creating a new object and assigning it to a variable
84 Creating an __autoload() Function
85 Creating the Cat constructor
86 Declaring and Using Object Constructors and Destructors
87 Declaring Final Classes and Methods
88 Define a setter and getter
89 Define abstract class
90 Define an Executive class that inherits Employee
91 Define and call getter method
92 Define and use constructor
93 Define boolean Class properties
94 Define class as constructor parameter
95 Define class constant
96 Define class helper class to check the method existance
97 Define class level constant value to control the class behaviour
98 Define Constructor for Class
99 Define getter and setter
100 Defining a classs stringification
101 Defining an interface
102 Defining an object constructor
103 Defining an object destructor
104 Defining and Using an Interface
105 Defining object constructors in PHP 4
106 Defining three member functions for Cat
107 Destuctor in action
108 Different class implements one interface
109 Empty class
110 Enforcing property access using magic accessor methods
111 Example of Inheritance
112 Extends and implement
113 Extends in action
114 Final class
115 Final keyword can be used to declare a class uninheritable
116 Final Methods
117 Finding the size of an array
118 Get class constructors parameter information
119 Get class information
120 Get Class method
121 Get class name
122 Get_class_methods
123 Get_class_vars
124 Get_declared_classes
125 Get_parent_class
126 If the variable was defined as private static, it would not be possible to access it directly
127 Implement an interface
128 Implementing a Simple Class
129 Implementing Multiple Interfaces
130 Improved Inheritance
131 In_array
132 Inheritance example
133 Inheriting a Shape Class
134 Instanceof operator
135 Instantiate class by calling the constructor
136 Intercepting Method Calls with the __call() Method (PHP 5 Only)
137 Intercepting Property Access with __get() and __set() (PHP 5 Only)
138 Invoking parent constructors
139 Is_a
140 Is_callable
141 Is_subclass_of
142 Method override for Rectangle class
143 Method_exists
144 Object Initialization
145 Object Overloading
146 Object Properties
147 Object Type Information
148 Objects Within Objects
149 Overriding Methods
150 Overriding parent methods
151 Parents clone
152 Pass class instance as parameter
153 Person class
154 PHP class declaration structure
155 Pre-defined methods
156 Private and inheritance
157 Private and protected variables
158 Private properties are accessible only inside the methods of the class that defined them
159 Properly implementing cloning in aggregated classes
160 Properties and methods marked as protected are accessible only through the object that owns them
161 Properties get Demo
162 Protect the class from being misused by accessing the members directly
163 Protected member variable
164 Public fields
165 Public method
166 Set property
167 Static class members
168 Static class properties
169 Subclass and parent class
170 The final keyword is used to declare that a method or class cannot be overridden by a subclass
171 The Method of a Child Class Overriding That of Its Parent
172 The Method of a Child Class Overriding That of Its Parent (PHP 4 Syntax)
173 Three levels of inheritance
174 Use poroperty set
175 Use public properties directly
176 Use Reflection class to export class
177 Use self to reference static class properties
178 Use the static modifier to change a member or method
179 Use this keyword
180 Use this keyword to reference interal properties
181 Using __sleep() and __wakeup() for Objects
182 Using Abstract Classes and Methods
183 Using Abstract Classes in PHP 5
184 Using an aggregated class
185 Using Class Constants
186 Using Class Constants in PHP5
187 Using Class Visibility Operators
188 Using Default Constructors
189 Using inheritance to efficiently represent various vehicle types
190 Using private and public in Classes
191 Using Static Methods and Properties to Limit Instances of a Class (PHP 5 Only)
192 Using the - and
193 Using the __autoload() Function
194 Using the __call() Method
195 Using the __clone() Method
196 Using the __toString() Method
197 Using the clone Statement
198 Using the extends keyword to define a subclass
199 Using the parent construct
200 Using the PHP 5 style constructor
201 Using Type Hinting with Interfaces
202 Using Unified Constructors and Destructors
203 Var_dump a class