GithubHelp home page GithubHelp logo

bootgly / bootgly Goto Github PK

View Code? Open in Web Editor NEW
205.0 5.0 1.0 6.14 MB

Base PHP Framework for Multi Projects

Home Page: https://docs.bootgly.com/

License: MIT License

PHP 99.38% HTML 0.31% Dockerfile 0.32%
framework frameworks php php-framework web http server cli bootgly http-server

bootgly's Issues

Bootgly Debugging - Roadmap Checklist

Backtrace

  • Backtrace class

Data

  • Data debug

Throwables

  • Throwables trace
  • Throwables report
  • Throwables debug

Errors

  • Errors collect
  • Errors trace
  • Errors report
  • Errors debug

Exceptions

Class responsible for correctly handling or translating the messages present in exceptions. For example, in a Template Engine, the compiled content is cached and will be executed as a file with a different location than the original template the user is using.

This class is responsible for catching the exception and modifying the file (and line if necessary), replacing it with the file and line that "contain the error" in the original template.

  • Exceptions collect
  • Exceptions trace
  • Exceptions report
  • Errors debug

Vars

  • Backtrace
  • Dump
  • Functions dump and dd helpers

Shutdown

  • Shutdown callback

Bootgly CLI - Roadmap Checklist

Commands

Default/Global Options

  • Verbose -v|-vv|-vvv
  • Help -h --help
  • Interactive -it

commands

  • Implement bootgly project command (arguments and options)

Bootgly Template Engine - Roadmap Checklist

Namespace:
Bootgly\ABI\Templates\Template

Directives

Conditionals

Ifs

  • Simple Ifs (@if, @elseif, @else)
  • Short syntax in Ifs for !empty and isSet

Switchs

  • Switch

Outputs

Echos

  • Prepending break line echo (@.>)
  • Append break line echo (@>.)
  • Wrap break line echo (@.>.)
  • Simple echo (@>)

Escapes

  • Inline escape (@@)

Loops

Whiles

  • Only While
  • While with @break
  • While with @continue
  • While with @break in ... (conditional break)
  • While with @continue in ... (conditional continue)

Foreachs

  • Foreach
  • Foreach with Metavar ($@)
  • Foreach with Metavar and nested support

For

  • For

Raw

  • PHP Code (@:...@;)

Precompilers / Postcompile

Precompilers

  • Unident

Postcompilers

  • Join <?php tags

Debugging

  • Set Path of Template file as comment token

doubt: Is it ok about change switch conditional for match operator ?

First things first, thank you for this awesome project ❤️

So, i have a doubt about change switch conditional on Logging (Bootgly\CLI\Terminal\_\Logger) and change it to new php8.0 expression (match), for example

<?php

namespace Bootgly\CLI\Terminal\_\Logger;

use Bootgly\Logger;

trait Logging
{
    private function translate (int $level) : array
    {
      switch ($level) {
         case self::LOG_DEBUG_LEVEL:
            $severity = 'DEBUG';
            $color = self::_WHITE_FOREGROUND;
            break;
         case self::LOG_INFO_LEVEL:
            $severity = 'INFO';
            $color = self::_GREEN_BOLD;
            break;
         case self::LOG_NOTICE_LEVEL:
            $severity = 'NOTICE';
            $color = self::_CYAN_FOREGROUND;
            break;
         case self::LOG_WARNING_LEVEL:
            $severity = 'WARNING';
            $color = self::_YELLOW_BOLD;
            break;
         case self::LOG_ERROR_LEVEL:
            $severity = 'ERROR';
            $color = self::_RED_BRIGHT_FOREGROUND;
            break;
         case self::LOG_CRITICAL_LEVEL:
            $severity = 'CRITICAL';
            $color = self::_MAGENTA_FOREGROUND;
            break;
         case self::LOG_ALERT_LEVEL:
            $severity = 'ALERT';
            $color = self::_MAGENTA_BOLD;
            break;
         case self::LOG_EMERGENCY_LEVEL:
            $severity = 'EMERGENCY';
            $color = self::_RED_BOLD;
            break;

         default:
            $severity = 'LOG';
            $color = self::_DEFAULT_FOREGROUND;
      }

      return [
         $severity, $color
      ];
   }
}

To:

<?php
 return match(int $level): array {
            self::LOG_DEBUG_LEVEL => ['DEBUG', self::_WHITE_FOREGROUND],
            self::LOG_INFO_LEVEL => ['INFO', self::_GREEN_BOLD],
            self::LOG_NOTICE_LEVEL => ['NOTICE', self::_CYAN_BOLD]
        };

I made a litte script with this class method and match return
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.