PHP Classes
elePHPant
Icontem

dynClass: Extends stdClass to have callable functions

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2017-03-19 (10 months ago) RSS 2.0 feedStarStarStarStar 66%Total: 151 All time: 8,459 This week: 572Up
Version License PHP version Categories
dynclass 1.0.0GNU General Publi...5PHP 5, Data types
Description Author

This class can extends stdClass to have callable functions.

The __construct function takes an array of values that define either class variables or functions. The variables or functions may also be assigned setting an object value.

Calling a property assigned to a callable function will call the function forwarding any parameters.

Innovation Award
PHP Programming Innovation award nominee
April 2017
Number 7
stdClass is an empty base class built-in PHP that does not contain any functions or variables. It is used to create generic objects.

stdClass objects can be created by converting values of other types to objects. However there are limitations.

The dynClass overcomes some of stdClass limitations by allowing for instance to have assign callable functions to object via the class constructor that takes an array of properties and functions as parameter.

Manuel Lemos
  Performance   Level  
Name: Chris Jeffries <contact>
Classes: 4 packages by
Country: United Kingdom United Kingdom
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file dynClass.class.php Class The class definition
Accessible without login Plain text file dynClass.docs.pdf Doc. How to use dynClass
Accessible without login Plain text file testdynclass.php Example Test program for dynClass

 Version Control Unique User Downloads Download Rankings  
 0%
Total:151
This week:0
All time:8,459
This week:572Up
 User Ratings  
 
 All time
Utility:81%StarStarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:87%StarStarStarStarStar
Examples:87%StarStarStarStarStar
Tests:-
Videos:-
Overall:66%StarStarStarStar
Rank:645