PHP Classes

File: README-EL.md

Recommend this page to a friend!
  Packages of Christos Drogidis   AOS Laravel Autoload   README-EL.md   Download  
File: README-EL.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: AOS Laravel Autoload
Integrate of Laravel framework into Ascoos OS
Author: By
Last change: Advanced Integration Guide: Laravel in Ascoos OS
Date: 17 days ago
Size: 9,934 bytes
 

Contents

Class file image Download

?????? ???????????? ???????????: Laravel ??? Ascoos OS

? ?????????? ???? ????????? PHP framework ???? ?? ??? ??????????? ??????? ??? ???????? ???? ??? kernel, ???? ??? ????????? macros ??? event pipeline, ??????? ??? ?????????? ??? ?????????? ??? ???? ??????? ???????. ??? Ascoos OS, ?? ????? ????????? ??? Web5 Kernel ??? ??????????? ??????????? ???? deferred execution, event?driven monitoring ??? global binding, ? ?????????? ??? Laravel ?????? ????????? ???????.

? ????? ?????? ??????????? ??? ???????????? ????????? ??? ???????? ??? ????????????? ??? Laravel ???? ??? ??????? laravel_autoload.php. ?? ?????? ???? ????? ??? ???? ??????? ???????? ??? ?????? ?? ?????????? ???? ??? ?????????? ?????? libs/laravel/autoload.php. ?? ?????????? ??? Laravel ??????? ?? ???????????? ???? ?? ?????? ??? ?????? ???????? ??? ???????, ????? ?? ?????????? ?? ??????? ??? ?????????????? ????????? ??? Ascoos OS.

? ????????? ???? ??? ???????????? ??? autoloading· ???????????? ????????????? ????????, unified logging ??? ??????? ????????? ??? ?????????? ??? ??????? ?? ???????? ???? ?? framework ????? ?????? ???????????.

?????? ??? ??????????

? ?????????? ??? Laravel ??? Ascoos OS ?????????? ??? ???????? ???????: ??????, ????????? ?? ????? ??? Laravel ?? application layer, ??? ????????, ?? ???????? ??? ??????????? ??? Web5 Kernel, ???? ?? ????????? ??? ??????????? ???.

? ?????????? ????????????:

  • ??????????? ??? Laravel framework ???? ??? ?????????? LibIn ? ??? ????????????? ????????? `Ascoos Store`.

    1. LibIn Upload

    Ascoos OS: ???????? ??????????? ???? ??? LibIn

    2. Ascoos Store

    Ascoos OS: Ascoos Store

  • ??????? ??? Laravel framework ???? ??? ?????????? LibIn.

Ascoos OS: ?????????? ?????????? ???????????

  • ???????????? ?? ????? ??? TMacroHandler ??? TEventHandler,
  • ???????? ???????????? ??????? ??? ??????? ?????????,
  • ?????? ???????? ??? ???? ?????????,
  • ??????? ????????? ??????????? (`laravel_init`),
  • ??????????? ???????? ??? ????????? ??? global scope ??? ????? ?????.

?? ????? ??? ?????, ?? Laravel ??? ?????????? ?? ??????????? framework, ???? ?? ????? ??? ???????????? ??????????.

?????????????? ?????????????

? ????????? ????????? ?? PHP 8.4.0+ ?? ?????????????? ?? strict_types=1.

?? Laravel ???????????? ???? ?????? /libs/laravel/ ??? Ascoos OS, ???? ???? ??? ?????????? LibIn upload, ???? ???? ??? ????????????? ????????? Ascoos Store.

?? Ascoos OS ??? ??????? Composer ??? ??? ???????????, ????? ?? LibIn ??????????? ??? ??????????? ??? ?????????? ??? ???????.

??? ?? ?????????? ??? Laravel framework ?????????? ?????? ??? ???? ?????????, ???? MySQL ? MariaDB.

?????? ??????? ??? Ascoos OS ??? ???????????

? ?????????? ????????? ??????? ??????? ??? Web5 Kernel:

  • TMacroHandler, ??? ??? ???????? macros ??? deferred ?????????,
  • TEventHandler, ??? ??? ????????? ??? ??????? ?????????,
  • TLoggerHandler, ??? unified logging,
  • LibIn, ??? ?? ??????? ?????? ??????????? ??? frameworks.

?? ??????? ????? ?????????? ??? Laravel ?? ???????? ??? event pipeline ??? Ascoos OS ??? ?? ?????????? ?? ????? ?????????? ?? ?? ???????? ???????.

??? ????????? ??? ???????????

? ?????????? ?????? ?? ??? ?????? ??? ????????? ??? framework ??? ??? ?????? ??????? ??? vendor/autoload.php. ?? ?? ?????? ??????, ? ???????? ??????? ?? ????????, ????? ?? Laravel ??? ?????? ?? ???????????? ????? ????.

????????? ? ??????? ??? bootstrap/app.php ??? ? ?????????? global binding ??? ????????? ??? $GLOBALS['laravel_app']. ???? ????????? ?? modules, macros ??? events ??? Ascoos OS ?? ????? ????? ???????? ??? Laravel container.

??? ????????, ? TMacroHandler ??????????????? ??? ??? ???????? ???????????? ???????. ?????????? ??????? ????????? ??? Laravel, ???? logging, authentication, database ??? router. ?? ?????? ???????? ??????, ?? ??????? ?? ??????????. ?? ???? ????? ??????????, ?? event handler ?????????? ??? ?? framework ????????? ?? ????? ??????????? ?????????.

? ?????? ??? ????? ????????? ??????? ???? ???? ????? ??????????? ??????????? PDO connection. ??? ?????????? query· ????? ?? connection test ??? ?? ???????????? ??? ?? database layer ????? ???????????.

???? ???????????? ??? ?? macros, ?? ??????? ???????? ?? ?????? laravel_init, ?? ????? ?????? ?? ??????????? ??? ???? modules ??? ?? ?????????? ????????? ??? ?????????? ??? ?? Laravel. ?? ?????? ??????????? ??? ??????? ???????, ???? ?? ??????? ???????? ??? event log.

?? ??????????? Macro

?? macro ??? ??????????????? ??? ??? ?????? ??? ????????? ????? ???? ???? ??????????????. ??????? ?? ?? ??????? ????????? ????? bound ??? container ??? ??? ???????? ????????? ?? ??????? ?? ?? ???? ?????????. ?? logging ??????? ???? ??? event handler, ???? ?? ??????? ?????? log stream ???? ??? Ascoos OS.

$macroHandler->addMacro(function () use ($laravel_app, $eventHandler) {
    $services = ['log', 'auth', 'db', 'router'];
    $missing = array_filter($services, fn($s) => !$laravel_app->bound($s));
    
    if (empty($missing)) {
        $eventHandler->logger->log("Laravel diagnostic passed", $eventHandler::DEBUG_LEVEL_INFO);
    } else {
        $eventHandler->logger->log("Missing services: " . implode(', ', $missing), $eventHandler::DEBUG_LEVEL_WARNING);
    }

    if ($laravel_app->bound('db')) {
        $laravel_app->make('db')->connection()->getPdo();
    }
});

??????????? Logs

? ???????? ?????????? ??????? ?????? logs ???? ??? ?? Laravel ??? ??? ??? ?? Ascoos OS. ??????????:

Laravel Logger

[INFO] Laravel initialized with Ascoos OS
[INFO] Laravel diagnostic passed: all core services available

Event Logger

[INFO] Laravel integration successful at 2025-10-04 19:27:00

?????????? ??? ?????????? ?????

? ???????????? ????????? ?????? ?? ????????? ?? custom events, ???? laravel.auth.success, ? ?? shared macros ??? ?????????? ??? ????? frameworks, ???? Symfony ? Yii. ?? Ascoos OS ??????????? ?????? ??????? ????????? ????????????, ???????????? ?? ????????? ????????? frameworks ??? ???? runtime.

?????

????? ??????

? ??????? ?????? ?????????? ??? ??? Ascoos General License (AGL).