PHP Classes

File: www/public_html/swoole.php

Recommend this page to a friend!
  Packages of Ramesh Narayan Jangid (Sharma)   PHP Microservices Framework   www/public_html/swoole.php   Download  
File: www/public_html/swoole.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Microservices Framework
Setup microservices apps with configuration arrays
Author: By
Last change:
Date: 5 days ago
Size: 1,052 bytes
 

 

Contents

Class file image Download
<?php
namespace Microservices\www\public_html;

/**
 * Index
 * php version 8.3
 *
 * @category  Start
 * @package   Microservices
 * @author    Ramesh N. Jangid (Sharma) <polygon.co.in@gmail.com>
 * @copyright © 2026 Ramesh N. Jangid (Sharma)
 * @license   MIT https://opensource.org/license/mit
 * @link      https://github.com/shames11/Microservices
 * @since     Class available since Release 1.0.0
 */

define ('__MODE__', 'private_api'); // token based auth
// define ('__MODE__', 'private_web'); // session based auth
// define ('__MODE__', 'public'); // public

switch (__MODE__) {
    case 'public':
        $DOMAIN_NAME = 'customer001.localhost'; // Public mode
        include __DIR__ . DIRECTORY_SEPARATOR . 'swoole_web.php';
        break;
    case 'private_web':
        $DOMAIN_NAME = 'web.customer001.localhost'; // Private Session mode
        include __DIR__ . DIRECTORY_SEPARATOR . 'swoole_web.php';
        break;
    case 'private_api':
        $DOMAIN_NAME = 'api.customer001.localhost'; // Private Token mode
        include __DIR__ . DIRECTORY_SEPARATOR . 'swoole_api.php';
        break;
}