Download the PHP package mp-php/fuel-packages-ratchet without Composer

On this page you can find all versions of the php package mp-php/fuel-packages-ratchet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fuel-packages-ratchet

fuel-packages-ratchet


Install ZeroMQ

Install

Setup to fuel/packages/ratchet

If you use git submodule or download zip, you must install vendors

$ cd fuel/packages/ratchet
$ php composer.phar install

Configuration

In app/config/config.php

'always_load' => array('packages' => array(
    'ratchet',
    ...

Copy packages/ratchet/config/ratchet.php to under app/config directory and edit

<?php

return array(
    'classes' => array(
        'default' => array(
            'domain' => 'example.com',
            'port' => '8001',
            'zmq_port' => '5555',
        ),
        'Ratchet_Ws' => array(
            'domain' => 'example.com',
            'port' => '8001',
        ),
        'Ratchet_Wamp' => array(
            'domain' => 'example.com',
            'port' => '8002',
            'zmq_port' => '5555',
        ),
    ),
);

Usage

$ php oil r ratchet:help

Run with Supervisor

# Install with easy_install command
$ sudo easy_install supervisor

# Generate configure file
$ echo_supervisord_conf > fuel/packages/ratchet/supervisor.conf

Example for supervisor.conf

Add the following
My_Ratchet_Ws is fuel/app/classes/my/ratchet/ws.php that extends Ratchet_Ws

[program:ratchet]
environment             = FUEL_ENV=production
command                 = php oil r ratchet:ws My_Ratchet_Ws
numprocs                = 1
autostart               = true
autorestart             = true
user                    = root
stdout_logfile          = fuel/app/logs/supervisor/info.log
stdout_logfile_maxbytes = 1MB
stderr_logfile          = fuel/app/logs/supervisor/error.log
stderr_logfile_maxbytes = 1MB

Example Commands

# In FuelPHP project root

# Up
$ sudo supervisord -c fuel/packages/ratchet/supervisor.conf

# Check Status
$ sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf status

# Stop
$ sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf stop all

# Start
$ sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf start all

# Restart
$ sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf restart all

Example Commands with Makefile

# make up
up:
    @echo 'Please manually run the following command:'
    @echo 'sudo supervisord -c fuel/packages/ratchet/supervisor.conf'

# make down
down:
    sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf stop all && sudo rm /tmp/supervisor.sock

# make start-all
start-all:
    sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf start all

# make stop-all
stop-all:
    sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf stop all

# make restart-all
restart-all:
    sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf restart all

# make status
status:
    sudo supervisorctl -c fuel/packages/ratchet/supervisor.conf status

# make help
help:
    @echo 'Commands:'
    @echo '  make up'
    @echo '  make down'
    @echo '  make start-all'
    @echo '  make stop-all'
    @echo '  make restart-all'
    @echo '  make status'

License

Copyright 2013, Mamoru Otsuka. Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php


All versions of fuel-packages-ratchet with dependencies

PHP Build Version
Package Version
Requires cboden/ratchet Version 0.2.*
react/zmq Version 0.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mp-php/fuel-packages-ratchet contains the following files

Loading the files please wait ....