PHP Classes

File: system/modules/rest/info.xml

Recommend this page to a friend!
  Classes of Mihajlo Siljanoski  >  Xmodule  >  system/modules/rest/info.xml  >  Download  
File: system/modules/rest/info.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Xmodule
Modular Web application development framework
Author: By
Last change:
Date: 7 years ago
Size: 911 bytes
 

Contents

Class file image Download
<module>
    <name>Rest</name>
    <description>Rest module will provide JSON response for API services or ajax calls.</description>
    <example>
        <init>$rest=module('rest');</init>
        <return>$rest will be an object with "response()" method.</return>
        <code>
            <pre>
<?php
    
    //init rest module
    $rest=module('rest');
    
    //example of use for regular response
    $rest->response(array('msg'=>'User registered!'));
                
?>
            </pre>
        </code>
        <code>
            <pre>
<?php
    
    //init rest module
    $rest=module('rest');
    
    //example of use for error response
    $rest->response(array('msg'=>'User already registered!'),false);
                
?>

            </pre>
        </code>
    </example>
</module>
<author>
    <name>Mihajlo Siljanoski</name>
    <web>https://mk.linkedin.com/in/msiljanoski</web>
</author>
For more information send a message to info at phpclasses dot org.