PHP Classes

File: templates/support/object.js.php

Recommend this page to a friend!
  Classes of Thierry Feuzeu   Jaxon   templates/support/object.js.php   Download  
File: templates/support/object.js.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Jaxon
Call PHP classes from JavaScript using AJAX
Author: By
Last change: Fixed issues in classes documentation.
Date: 4 years ago
Size: 513 bytes
 

Contents

Class file image Download
<?php echo $this->sPrefix ?><?php echo $this->sClass ?> = {};
<?php foreach($this->aMethods as $aMethod): ?>
<?php
echo $this->sPrefix ?><?php echo $this->sClass ?>.<?php echo $aMethod['name'] ?> = function() {
    return jaxon.request(
        { jxncls: '<?php echo $this->sClass ?>', jxnmthd: '<?php echo $aMethod['name'] ?>' },
        { parameters: arguments<?php foreach($aMethod['config'] as $sKey => $sValue): ?>, <?php echo $sKey ?>: <?php echo $sValue ?><?php endforeach ?> }
    );
};
<?php endforeach;