Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum (2) | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 563 | All time: 5,355 This week: 292![]() |
Version | License | PHP version | Categories | |||
div-ajax-mapping 1.4 | GNU General Publi... | 5.4 | PHP 5, Web services, AJAX |
Collaborate with this project | Author | |
divengine.div-ajax-mapping - github.com Description This package can be used to call PHP classes and functions using AJAX requests. Innovation Award |
PHP Hot Mapping Hot Mapping of PHP data, functions and methods in JavaScript phpHotMap is an open source library for JavaScript and PHP, that allow mapping the PHP functions, static methods of classes and arbitrary data on the spot of the instance a JavaScript class. With this class you can call a functions and methods via AJAX. For example: -------------------------------------------- In the server: -------------------------------------------- <?php // Include the library include "phpHotMap.php"; include "phpHotMapServer.php"; // The program // Note: the programa can be located in an external file function sum($x, $y){ return $x + $y; } class Enterprise{ public function getEmployees(){ return array( array("name" => "Thomas Hardy", "salary" => 1500), array("name" => "Christina Berglund", "salary" => 1200) ); } } // Server instance ... $server = new phpHotMaServer(); // ... Add methods ... $server->addMethod("sum", "x,y"); $server->addMethod("Enterprise::getEmployees", "x,y"); // ... and go! $server->go(); ?> -------------------------------------------- In the client: -------------------------------------------- <script type = "text/javascript" src="phpHotMap.js"></script> <script type = "text/javascript"> var client = new phpHotMapClient("server.php"); var sum = client.sum(20, 10); var employees = client.Enterprise.getEmployees(); var firstEmployeeName = employees[0]['name']; </script> |
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Data | new | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() |
Class | Class source | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | first commit | ||
![]() ![]() |
Data | first commit | ||
![]() |
Class | first commit | ||
![]() |
Class | first commit | ||
![]() |
Class | Class source | ||
![]() ![]() |
Doc. | first commit |
![]() |
/ | example |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Example | first commit | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data |
![]() |
/ | example | / | assets |
File | Role | Description |
---|---|---|
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
![]() ![]() |
Data | Auxiliary data |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
72% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.