Download the PHP package php-pmd/daemon without Composer

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

Daemon

Daemon based on Clio.

The Daemon class provides helpers for starting and killing daemonized processes.

Installation

PHP 5.4 is required. This library is developed on and is meant to be used on POSIX systems with the posix, pcntl, and sockets extensions loaded.

Daemon::isRunning($pid)

Tests if a daemon is currently running or not. Returns true or false:

Daemon::work(array $options, callable $callable)

Daemonize a $callable callable object. The $options key-value array must contain pid as the path to the PID file:

The PID file is an ordinary text file with the process ID as its only content. It will be created by the library automatically if it doesn't exist. It is highly recommended to put a call to sleep to ease the system load.

Daemon::kill($pid, $force = false, $delete = false)

$force

The value of force is true, the sig is SIGKILL

The value of force is false, the sig is SIGTERM

$delete

Flag to delete PID file after killing

Kill a daemonized process:

If the second parameter is set to true, this function will send SIGKILL to the process.If it is set to false, this function will send SIGTERM to the process.

If the third parameter is set to true, this function will try to delete the PID file after successfully sending the process a kill signal.

Acknowledgments

The text color and style specifiers are taken entirely from PEAR's Console_Color class by Stefan Walk. The Daemon class is heavily inspired from Andy Thompson's blog post on daemonizing a PHP CLI script on a POSIX system.

License

Clio is released under the MIT License.


All versions of daemon with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-pcntl Version *
ext-posix 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 php-pmd/daemon contains the following files

Loading the files please wait ....