laswitchtech/php-service

PHP Service Library

v1.0.0 2022-12-30 16:33 UTC

This package is auto-updated.

Last update: 2024-04-29 04:54:11 UTC


README

GitHub repo logo

phpService

License GitHub repo size GitHub top language Version

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);
}