Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pmill committed Jul 8, 2015
0 parents commit 9840c92
Show file tree
Hide file tree
Showing 21 changed files with 2,963 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .codeclimate.yml
@@ -0,0 +1,9 @@
languages:
Ruby: true
JavaScript: true
PHP: true
Python: true
exclude_paths:
- examples/*
- vendor/*
- tests/*
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
/vendor/
/.idea/
/build/
14 changes: 14 additions & 0 deletions .travis.yml
@@ -0,0 +1,14 @@
language: php
php:
- 5.4
- 5.5
- 5.6
- hhvm
- nightly
install: composer install --dev
before_script:
- git config --global user.email "dev.pmill@gmail.com"
- git config --global user.name "pmill"

after_script:
- php vendor/bin/test-reporter
22 changes: 22 additions & 0 deletions LICENSE
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2015 pmill

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

66 changes: 66 additions & 0 deletions README.md
@@ -0,0 +1,66 @@
php-chat
============

[![Build Status](https://secure.travis-ci.org/pmill/php-chat.svg?branch=master)](http://travis-ci.org/pmill/php-chat) [![Code Climate](https://codeclimate.com/github/pmill/php-chat/badges/gpa.svg)](https://codeclimate.com/github/pmill/php-chat) [![Test Coverage](https://codeclimate.com/github/pmill/php-chat/badges/coverage.svg)](https://codeclimate.com/github/pmill/php-chat/coverage) [![Test Coverage](https://scrutinizer-ci.com/g/pmill/php-chat/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/pmill/php-chat/)

Introduction
------------

A multi-user multi-room ratchet server.

Requirements
------------

This library package requires PHP 5.4 or later.

Installation
------------

### Installing via Composer

The recommended way to install php-chat is through
[Composer](http://getcomposer.org).

```bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest version of php-chat:

```bash
composer.phar require pmill/php-chat
```

After installing, you need to require Composer's autoloader:

```php
require 'vendor/autoload.php';
```

Usage
-----

An example is provided in the example/ directory. Start the server with the command:

php example/server.php

An example HTML client interface is located at example/client.html. You will need to update the chatUrl variable in
example/chat.js with the host name (or ip address) of the server you ran the previous command on.

var chatUrl = 'ws://your-host-name:9911';

Version History
---------------

0.1.0 (08/07/2015)

* First public release of php-chat


Copyright
---------

php-chat
Copyright (c) 2015 pmill (dev.pmill@gmail.com)
All rights reserved.
29 changes: 29 additions & 0 deletions composer.json
@@ -0,0 +1,29 @@
{
"name": "pmill/php-chat",
"description": " A multi-user multi-room ratchet server ",
"keywords": ["php", "web socket", "ratchet", "chat"],
"homepage": "https://github.com/pmill/php-chat",
"time": "2015-07-08",
"license": "MIT",
"authors": [
{
"name": "pmill",
"email": "dev.pmill@gmail.com",
"homepage": "https://github.com/pmill",
"role": "Author"
}
],
"autoload": {
"psr-0": {
"pmill\\Chat": "src/"
}
},
"require": {
"php": ">=5.4.0",
"cboden/ratchet": "0.3.*"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"codeclimate/php-test-reporter": "dev-master"
}
}

0 comments on commit 9840c92

Please sign in to comment.