PHP Classes

Packages of sourav ray

Recommend this page to a friend!
  All class groups  >  All authors  >  Packages of sourav ray (2)  >  Mission progress status  >  Reputation  
Picture of sourav ray
Name: sourav ray is available for providing paid consulting. Contact sourav ray .
Classes: 2
Country: India India
Age: 46
All time rank: 162692 in India India
Week rank: 195 Up19 in India India Up
All time users: 1791
Week users: 0
Innovation award
Innovation award
Nominee: 1x
 
  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  
  Files folder image Constant Array  
PHP Programming Innovation award nominee
November 2007
Number 7


Prize: One copy of Delphi for PHP
Declare arrays as constants
This class can be used to declare arrays as constants.

It serializes a given array value to a string and assigns it a given constant.

The class can also do the opposite, i.e retrieve the original constant array value by unserializing the value assigned to the constant.

In Version 2.0.0 arrConst got an advance feature of
accessing the value of a particular element of the Array Constant
The get method is overloaded for this purpose [;) I know actual overloading is not possible in PHP ]

  Files folder image True Singleton Class  
PHP implementation of the singleton design pattern
In software engineering, a design pattern is a general solution to a common problem in software design. One of these design patterns is called the Singleton. It's purpose can be described quite briefly as follows:

Ensure a class has only one instance and provide a global point of access to it.

It achieves this by only creating a new instance the first time it is referenced, and thereafter it simply returns the handle to the existing instance.

--------------------------------------------------------------------------------------------

sTonClass is a base class that implements the singleton design pattern.

The class can only be instantiated using a static function that assures that there is only one object of that class.

If the class was already instantiated, it returns a reference to the previously created class object.

The class also provides functions for store, retrieving and deleting object properties.


  A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z