PHP Classes
elePHPant
Icontem

PHP JavaScript Object: Create object that works like a JavaScript object

Recommend this page to a friend!
  Info   View files View files (1)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-07-25 (4 months ago) RSS 2.0 feedNot enough user ratingsTotal: 182 All time: 8,191 This week: 616Up
Version License PHP version Categories
js-object 1.0.1MIT/X Consortium ...5.4PHP 5, Data types, Language
Description Author

This class can create an object that works like a JavaScript object.

It can take an array of property values to set the object variables.

The class redefined the __call magic method, so calls to closure function variables have the $this pseudo-variable assigned to the current object, so code of the closure function variables can access the object properties using $this.

Innovation Award
PHP Programming Innovation award nominee
December 2015
Number 8


Prize: SourceGuarding PHP encoder tool
In JavaScript the this pseudo variable refers to the current object associated to a function being called.

In PHP closure functions can be assigned to object functions but the $this pseudo variable does not become associated automatically to the object.

This class can make the $this variable be associated to a closure function assigned dynamically to a class object function.

It uses the __call magic method to properly bind the $this variable when calling an object closure function.

Manuel Lemos
  Performance   Level  
Name: Kevinralph M Tenorio <contact>
Classes: 2 packages by
Country: Philippines Philippines
Age: 33
All time rank: 385932 in Philippines Philippines
Week rank: 916 Up15 in Philippines Philippines Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file JSObject.php Class Main Class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:182
This week:0
All time:8,191
This week:616Up