PHP Classes

File: app/Core/Helpers/httpHelperFunctions.php

Recommend this page to a friend!
  Classes of Ahmad Mustapha   ReactPHP Chat Client   app/Core/Helpers/httpHelperFunctions.php   Download  
File: app/Core/Helpers/httpHelperFunctions.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ReactPHP Chat Client
Implement a live chat system based on Web Sockets
Author: By
Last change:
Date: 3 years ago
Size: 381 bytes
 

Contents

Class file image Download
<?php

use App\Http\Response;

require
'generalHelperFunctions.php';

function
response(int $statusCode = 200)
{
    return new
Response($statusCode);
}

function
view_path(?string $viewPath): string
{
    global
$slash;
    return
root_path("resources{$slash}views{$slash}{$viewPath}");
}

function
clientCounter()
{
    static
$counter = 0;
   
$counter++;
    return
$counter;
}