Download the PHP package coderkungfu/php-queue without Composer

On this page you can find all versions of the php package coderkungfu/php-queue. 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 php-queue

PHP-Queue

Gitter

A unified front-end for different queuing backends. Includes a REST server, CLI interface and daemon runners.

Build Status

Why PHP-Queue?

Implementing a queueing system (eg. Beanstalk, Amazon SQS, RabbitMQ) for your application can be painful:

PHP-Queue hopes to serve as an abstract layer between your application code and the implementation of the queue.

Benefits


Installation

Installing via Composer

Composer is a dependency management tool for PHP that allows you to declare the dependencies your project needs and installs them into your project. In order to use the PHP-Queue through Composer, you must do the following:

  1. Add "coderkungfu/php-queue" as a dependency in your project's composer.json file. Visit the Packagist page for more details.

  2. Download and install Composer.

  3. Install your dependencies.

  4. All the dependencies should be downloaded into a vendor folder.

  5. Require Composer's autoloader.

Getting Started

You can have a look at the Demo App inside .\vendor\coderkungfu\php-queue\src\demo\ folder for a recommended folder structure.

I would also recommend putting the autoloader statement and your app configs inside a separate config.php file.

Recommended config.php file content:

Altenative config.php file:

You can also declare your application's namespace for loading the Queues and Workers.

PHP-Queue will attempt to instantiate the PHPQueue\JobQueue and PHPQueue\Worker classes using your namespace - appended with the queue/worker name. (ie. \MyFabulousApp\Queues\Facebook).

It might be advisable to use Composer's Custom Autoloader for this.

Note:
If you declared PHPQueue\Base::$queue_path and/or PHPQueue\Base::$worker_path together with the namespace, the files will be loaded with require_once from those folder path AND instantiated with the namespaced class names.

REST Server

The default REST server can be used to interface directly with the queues and workers.

Copy the htdocs folder in the Demo App into your installation. The index.php calls the \PHPQueue\REST::defaultRoutes() method - which prepares an instance of the Respect\Rest REST server. You might need to modify the path of config.php within the index.php file.

Recomended installation: use a new virtual host and map the htdocs as the webroot.

  1. Add new job.

  2. Trigger next job.

Read the full documentation on Respect\Rest to further customize to your application needs (eg. Basic Auth).

Command Line Interface (CLI)

Copy the cli.php file from the Demo App into your installation. This file implements the \PHPQueue\Cli class. You might need to modify the path of config.php within the cli.php file.

  1. Add new job.

  2. Trigger next job.

You can extend the PHPQueue\Cli class to customize your own CLI batch jobs (eg. import data from a MySQL DB into a queue).

Runners

You can read more about the Runners here.

Interfaces

The queue backends will support one or more of these interfaces:

This is the recommended way to consume messages. AtomicReadBuffer provides the popAtomic($callback) interface, which rolls back the popped record if the callback returns by exception. For example: $queue = new PHPQueue\Backend\PDO($options);

$queue->popAtomic(function ($message) use ($processor) {
    $processor->churn($message);
});

The message will only be popped if churn() returns successfully.

A first in first out queue accessed by push and pop.


License

This software is released under the MIT License.

Copyright (C) 2012 Michael Cheng Chi Mun

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.


All versions of php-queue with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
monolog/monolog Version ~1.3||~2
clio/clio 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 coderkungfu/php-queue contains the following files

Loading the files please wait ....