PHP Classes

File: system/modules/messaging/info.xml

Recommend this page to a friend!
  Classes of Mihajlo Siljanoski   Xmodule   system/modules/messaging/info.xml   Download  
File: system/modules/messaging/info.xml
Role: Example script
Content type: text/plain
Description: Example script
Class: Xmodule
Modular Web application development framework
Author: By
Last change:
Date: 7 years ago
Size: 1,468 bytes
 

Contents

Class file image Download
<module>
    <name>Messaging <small>(v. 1.1+)</small></name>
    <description>With Messaging module you can easily make loong pooling or interval pooling messaging system and handle independent clients (html / android / iOS ...).</description>
    <example>
        <init>$msg=module('messaging');</init>
        <return>$msg object will contains methods 'send' and 'get':</return>
        <code>
            <pre>
<?php
   
   
//init Messaging module , this also will create table in databse (if not exist) for clients messages <config_id>_msg
   
$msg=module('messaging');
   
   
//example for sending message to some client_id //return is boolean (true/false)
       
   
$msg->send($user['id'],'Hello!');
       
   
$msg->send($user['id'],'How are you?');
   
   
?>
</pre>
        </code>
       
       
       
        <code>
            <pre>
<?php
   
    
//init Messaging module , this also will create table in databse (if not exist) for clients messages <config_id>_msg
   
$msg=module('messaging');
        
   
//example for handling messages of some client_id
        
   
$msg->get($user['id']); //first return will be string: 'Hello!'
        
   
$msg->get($user['id']); //second return will be string: 'How are you?'
   
?>
</pre>
        </code>
       
       
       
    </example>
</module>
<author>
    <name>Mihajlo Siljanoski</name>
    <web>https://mk.linkedin.com/in/msiljanoski</web>
</author>