PHP Classes

File: examples/websocket/app/controllers/connect.php

Recommend this page to a friend!
  Packages of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/websocket/app/controllers/connect.php   Download  
File: examples/websocket/app/controllers/connect.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 10 years ago
Size: 680 bytes
 

Contents

Class file image Download
<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of connect
 *
 * @author jonah
 */
class connect extends A_Controller_Action
{
    public function __construct($locator=null)
    {
        parent::__construct($locator);
    }

    public function user($locator = null)
    {
        $message = $locator->get('Request')->getData();

        /*$client = new client();

        $message->setSession(new A_Collection);

        $message->getSession()->set('client', $client);*/

        $message->reply(array(
                'command' => 'new:user',
                'data' => 'hello'//$client->serialize()
            ),
            A_Socket_Message::OTHERS
        );
        echo 'Connected!' . PHP_EOL;
    }
}