HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/limestate-api/Models/Output.php
<?php

class Output
{
    const FONT_YELLOW           = "\033[33m\033[1m";
    const FONT_WHITE            = "\033[47m\033[1m";
    const FONT_GREEN            = "\033[47m\033[1m";
    const FONT_LIGHT_GREY       = "\033[37m\033[2m";
    const BG_RED                = "\033[41m";
    const BG_GREEN              = "\033[42m";
    const NORMAL                = "\033[0m";


    public static function log($string)
    {
        echo self::FONT_LIGHT_GREY
         . '  - ' . $string . PHP_EOL
         . self::NORMAL;
    }

    public static function title($string)
    {
        echo self::FONT_YELLOW
            . '========================================================================' . PHP_EOL
            . ' ' . $string . PHP_EOL
            . '========================================================================' . PHP_EOL
            . self::NORMAL . PHP_EOL;
    }

    public static function header($string)
    {
        echo self::FONT_YELLOW . PHP_EOL
            . ' ' . $string . PHP_EOL
            . '------------------------------------------------------------------------' . PHP_EOL
            . self::NORMAL . PHP_EOL;
    }

    public static function error($string)
    {
        echo PHP_EOL
            . self::BG_RED . self::FONT_WHITE . PHP_EOL
            . PHP_EOL . "\t" . str_replace("\n", "\n\t", $string) . PHP_EOL
            . self::NORMAL . PHP_EOL . PHP_EOL;
    }

    public static function write($string)
    {
        echo ' ' . $string . PHP_EOL;
    }

    public static function rewrite($string)
    {
        $numNewLines = substr_count($string, PHP_EOL);
        echo chr(27) . "[0G"; // Set cursor to first column
        echo chr(27) . "[" . $numNewLines ."A"; // Set cursor up x lines
        echo str_pad($string, 80) . PHP_EOL;
    }

    public static function success($string)
    {
        echo PHP_EOL . ' ' . self::FONT_WHITE . self::BG_GREEN
             . ' ' . $string . ' '
             . self::NORMAL . ' ' . PHP_EOL . PHP_EOL;
    }
}