laswitchtech / php-service
PHP Service Library
v1.0.0
2022-12-30 16:33 UTC
Requires
- laswitchtech/php-cli: ^1.0
This package is auto-updated.
Last update: 2024-12-29 06:41:05 UTC
README
phpService
Features
- Service
Why you might need it
If you are looking for an easy start for your PHP Service. Then this PHP Class is for you.
Can I use this?
Sure!
License
This software is distributed under the GNU General Public License v3.0 license. Please read LICENSE for information on the software availability and distribution.
Requirements
- PHP >= 8.0
Security
Please disclose any vulnerabilities found responsibly – report security issues to the maintainers privately.
Installation
Using Composer:
composer require laswitchtech/php-service
How do I use it?
Example
#!/usr/bin/env php session_start(); //Import phpCLI class into the global namespace //These must be at the top of your script, not inside a function use LaswitchTech\phpCLI\phpCLI; //Load Composer's autoloader require 'vendor/autoload.php'; // Interpret Standard Input if(defined('STDIN') && !empty($argv)){ // Start Command new phpCLI($argv); }