Download the PHP package glebsky/simple-queue without Composer

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

Simple Queue

Latest Stable Version Total Downloads Stable License PHP Version

Simple queues and simple queue handling for your PHP project

Russian

--- ## Installation The library is installed via composer. ## Configuration You need to implement the `TransportInterface` interface. You can use MySql, Redis or any other storage that suits you. The data that is present in `Message` and your class must be based on this data. > For example, you can refer to `example/DBTranspot.php` which works on PDO basis. > You can also use the ready-made `Transport` class `Glebsky\SimpleQueue\Transports\PDOTransport` which is based on PDO and works with SQL databases. > > To create a table of queues in the Database, the `migrate` method is present in this class ## Usage #### Create a task You need to create your own Job class to implement the interface `JobInterface` - `public $queueName` - property in this class You can assign a queue to a particular job. If this property is not added, the queue will not be assigned. - `public $priority` - property in this class You can set the priority in numbers, the higher the number, the higher the priority. `handle` method In this class will be executed when processing the queue. This is where you put the code you need. > An example class can be found in `example/TestJob.php` #### Adding a task to the queue The `Queue` class is used to add a task to the queue. We need to create an instance of our `TransportInterface` and connect it to the `Queue` class. Then we create our task - `TestJob` and add the task to the queue using the `dispatch` method #### Queue Processing The queue is processed using the `Worker` class. You can create your own PHP script where tasks will be handled, and you can run this script via CLI. An example of running a script. Where `example_queue,test_queue` are the comma-separated names of the queues to be processed. If you do not pass the queue name parameter, the handler will work with unnamed queues. It is also possible to process a specific task, in a place convenient for you in your application. ### Built-in PDOTransport class If you plan to set up communication based on SQL databases, you can use the built-in class `PDOTransport` Usage example: ### Tests To run tests, you can use the command `composer run-script test-simple-queues` > Examples can be found in the `example` folder Stand With Ukraine

All versions of simple-queue with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
ext-json Version *
ext-pdo Version *
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 glebsky/simple-queue contains the following files

Loading the files please wait ...