PHP Classes

File: README-EL.md

Recommend this page to a friend!
  Packages of Christos Drogidis   Ascoos OS - CiC (Cross-Interpreter Communication)   README-EL.md   Download  
File: README-EL.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Ascoos OS - CiC (Cross-Interpreter Communication)
combine WordPress and Joomla in a shared runtime
Author: By
Last change:
Date: 4 months ago
Size: 4,768 bytes
 

Contents

Class file image Download

Cross-Interpreter Communication (CiC) ? WordPress & Joomla Case Study

???? ? ?????? ?????????? ??????? ??? ?? Ascoos OS ???????? ?? ??????? CiC (Cross?Interpreter Communication) ??? ?? ????????? WordPress ??? Joomla ?? ????? runtime. ???? ??? ???? ??????????, ???? CMS ?????????? ?? ????????? ???????????? ??? ?????? ?? ???????, ?? ?????????? ??? ?? ??????????? ?????? ?? ?????????? ?????, ?????????? ??? ????? ??? ?????????????????? Web5 ??? WebAI.

??????

  • ???????? WordPress hooks ?? ????? interpreter
  • ????????? hooks ?? ???????????? ?? ????????
  • ???????? Joomla API calls ???? bridge
  • ?????????? ????????????? ?? ?????? render
  • ???????? Web5 interoperability ?? CiC

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

  • TWordpressInterpreterHandler ???????? WordPress hooks ?? ??????????? ???????
  • TWordpressHookTranslatorHandler ????????? hooks ?? ???????????? ?? ????????
  • TJoomlaApiBridgeHandler ???????? Joomla API calls ??? ????????? ?????????
  • TMacroHandler ????????? ??? ???????? conditional macros ??? ???????? CMS
  • TErrorMessageHandler ?????????? ????????? ??? ????????? ?????????

???? ???????

? ????????? ????????? ?? ??? ?????? PHP: - wp_joomla_in_aos.php

???????????? ??? ?? ??????: ???????? WordPress hooks, ????????? ?? macros, ???????? Joomla API ??? ????????? ?????????????.

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

  1. PHP ? 8.2
  2. ????????????? ?? Ascoos OS ? ?? AWES 26
  3. ????????? autoloaders ??? WordPress ??? Joomla ???????

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

  1. ?????????? ? ??????? ??? WordPress ??? ??? Joomla ???? autoloaders.
  2. ? WordPress hook `add_action('wp_head', 'my_custom_head', 10, 1)` ??????????? ??? ??? `TWordpressInterpreterHandler`.
  3. ? hook ???????????? ?? macro ???? `TWordpressHookTranslatorHandler`.
  4. ? macro ????????? ??? `TMacroHandler` ?? conditional ????????.
  5. ? `TJoomlaApiBridgeHandler` ????? ?? API `JFactory::getUser`.
  6. ? `TMacroHandler` ??????? ??? ?? conditional macros.
  7. ???????????? ?? ???????????? ??? ??????????? ?????? render.

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

$wpInterpreter = new TWordpressInterpreterHandler(['cms' => ['cmsType' => 'wordpress']]);
$wpHook = $wpInterpreter->interpretHooks("add_action('wp_head', 'my_custom_head', 10, 1)");

$wpTranslator = new TWordpressHookTranslatorHandler();
$wpMacro = $wpTranslator->translate($wpHook, ['hook' => 'wp_head']);

$macroEngine->addConditionalMacro(
    $wpMacro->condition->condition,
    fn(...$p) => $wpMacro->executeIfTrue(...$p)
);

$joomlaApiBridge = new TJoomlaApiBridgeHandler();
$userData = $joomlaApiBridge->bridge('JFactory::getUser', []);

$macroEngine->runAllConditional();
echo "@render_combined({$userData['name']})";

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

@render_combined(Ascoos user)

?????

??????????

???????? ?? ??????????? ?? CiC ?? ????????????? interpreters (?.?. Drupal, Python APIs) ? ?? ?????????? ???? translators ??? ??? ??????? hooks. ????? ?? CONTRIBUTING.md ??? ???????.

????? ??????

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