bootgly / bootgly Goto Github PK
View Code? Open in Web Editor NEWBase PHP Framework for Multi Projects
Home Page: https://docs.bootgly.com/
License: MIT License
Base PHP Framework for Multi Projects
Home Page: https://docs.bootgly.com/
License: MIT License
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.
dump
and dd
helpers-v|-vv|-vvv
-h --help
-it
bootgly project
command (arguments and options)Namespace:
Bootgly\ABI\Templates\Template
@if
, @elseif
, @else
)!empty
and isSet
@.>
)@>.
)@.>.
)@>
)@@
)@break
@continue
@break in ...
(conditional break)@continue in ...
(conditional continue)$@
)@:...@;
)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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.