Ajout et tests des modules Wordpress et Prestashop

Installation finalisée pour wordpress
Installation en erreur pour Prestashop
This commit is contained in:
Emmanuel ROY 2019-12-06 17:35:12 +01:00
parent 3e508c362d
commit 2e4d5bfbfd
2069 changed files with 954833 additions and 16 deletions

0
README.md Executable file → Normal file
View file

0
application/class/Application.php Executable file → Normal file
View file

0
application/class/Asynchonous.php Executable file → Normal file
View file

0
application/class/Bdd.php Executable file → Normal file
View file

0
application/class/Browser.php Executable file → Normal file
View file

0
application/class/Caracter.php Executable file → Normal file
View file

0
application/class/Controlleur.php Executable file → Normal file
View file

0
application/class/ControlleurAction.php Executable file → Normal file
View file

0
application/class/Dispacher.php Executable file → Normal file
View file

0
application/class/Dumper.php Executable file → Normal file
View file

0
application/class/HttpMethod.php Executable file → Normal file
View file

0
application/class/HttpMethodRequete.php Executable file → Normal file
View file

0
application/class/Implement/Action.php Executable file → Normal file
View file

0
application/class/Implement/Conduit.php Executable file → Normal file
View file

View file

View file

0
application/class/Implement/HttpReponse.php Executable file → Normal file
View file

0
application/class/Implement/RestReponse.php Executable file → Normal file
View file

0
application/class/Logger.php Executable file → Normal file
View file

0
application/class/Modele.php Executable file → Normal file
View file

62
application/class/Modular.php Executable file → Normal file
View file

@ -5,16 +5,72 @@ namespace MVC\Classe;
class Modular{
private $app = "";
private $subapp_dir = "";
private $subfile = "index.php";
public function __construct($appName,$type = 'symfony',$options = array()){
//Dumper::dump($options);die();
public function __construct($appName){
$this->app = $appName;
switch ($type) {
case "symfony":
break;
case "wordpress":
if(isset($options[0])) {
switch ($options[0]) {
case 'wp-admin':
$this->subapp_dir = DIRECTORY_SEPARATOR . $options[0];
if(isset($options[1])) {
switch ($options[1]) {
case 'setup-config.php':
case 'install.php':
$this->subfile = $options[1];
break;
default:
if(preg_match('#(.)*\.php#',$options[1])){
$this->subfile = $options[1];
}
}
}
break;
case 'wp-login.php':
$this->subfile = $options[0];
break;
default:
}
}
break;
case "prestashop":
if(isset($options[0])) {
switch ($options[0]) {
case 'admin-dev':
case 'install-dev':
$this->subapp_dir = DIRECTORY_SEPARATOR . $options[0];
break;
default:
}
}
break;
}
}
public function getAppName(){
return $this->app;
}
public function load(){
require MODULES_PATH . DIRECTORY_SEPARATOR . $this->getAppName() . DIRECTORY_SEPARATOR . "public" . DIRECTORY_SEPARATOR . "index.php";
public function load($type = "symfony"){
switch ($type) {
case "symfony":
require MODULES_PATH . DIRECTORY_SEPARATOR . $this->getAppName() . DIRECTORY_SEPARATOR . "public" . DIRECTORY_SEPARATOR . "index.php";
break;
case "wordpress":
require MODULES_PATH . DIRECTORY_SEPARATOR . $this->getAppName() . $this->subapp_dir . DIRECTORY_SEPARATOR . $this->subfile;
break;
case "prestashop":
require MODULES_PATH . DIRECTORY_SEPARATOR . $this->getAppName() . $this->subapp_dir . DIRECTORY_SEPARATOR . "index.php";
break;
}
}
}

0
application/class/ModularRegister.php Executable file → Normal file
View file

0
application/class/Session.php Executable file → Normal file
View file

0
application/class/Tri.php Executable file → Normal file
View file

39
application/class/Url.php Executable file → Normal file
View file

@ -56,22 +56,39 @@ class Url
$page['params'] = array();
$this->page = $page;
return;
}else {
foreach ($urlParts as $key => $value) {
$values[] = $value;
$keys[] = $key;
}
$page['params'] = $values;
}
//cas d'utilisation normal : il existe autant de clé que de valeurs
} else if ( $numParts != 0 ) {
$values = array();
$keys = array();
foreach($urlParts as $key => $value ){
if($key%2 == 0) {
// si c'est un module alors on charge un a un les parametres
if( in_array($page['name'], $this->registre->getIndex()) ){
foreach ($urlParts as $key => $value) {
$values[] = $value;
} else {
$keys[] = $value;
$keys[] = $key;
}
$page['params'] = $values;
// sinon c'est une page normal du framework
} else {
$values = array();
$keys = array();
foreach ($urlParts as $key => $value) {
if ($key % 2 == 0) {
$values[] = $value;
} else {
$keys[] = $value;
}
}
if ($page['control']) {
$page['params'] = array_combine($values, $keys);
} else {
$page['params'] = array_combine($keys, $values);
}
}
if($page['control']){
$page['params'] = array_combine($values, $keys);
}else {
$page['params'] = array_combine($keys, $values);
}
}
//verification de l'existence de la page dans les controlleurs

0
application/class/Vue.php Executable file → Normal file
View file

0
application/class/VueVide.php Executable file → Normal file
View file

0
application/config/authentification-config-example.php Executable file → Normal file
View file

0
application/config/define-constantes.php Executable file → Normal file
View file

0
application/config/files/routing.yml Executable file → Normal file
View file

0
application/include/actions/DefaultAction.php Executable file → Normal file
View file

0
application/include/conduits/FooConduit.php Executable file → Normal file
View file

View file

0
application/include/controlleurs/ErrorHttpReponse.php Executable file → Normal file
View file

0
application/include/controlleurs/accueil.php Executable file → Normal file
View file

0
application/include/controlleurs/authentification.php Executable file → Normal file
View file

0
application/include/controlleurs/compte.php Executable file → Normal file
View file

0
application/include/controlleurs/error.php Executable file → Normal file
View file

View file

@ -0,0 +1,5 @@
<?php
$app = new MVC\Classe\Modular($name,'prestashop',$url_params);
//echo "Dawn Prestashop Error!";
echo $app->load('prestashop');die();
$templateData = array('app' => $app);

0
application/include/controlleurs/syf43.php Executable file → Normal file
View file

0
application/include/controlleurs/syf51.php Executable file → Normal file
View file

View file

@ -0,0 +1,29 @@
<?php
\MVC\Classe\Session::start();
$app = new MVC\Classe\Modular($name,'wordpress',$url_params);
//echo "Dawn Wordpress Error!";
/*
* Avoid Warning on my version ....
*
on application/modules/wordpress/wp-admin/menu-header.php:74
if(!is_array($menu)){$menu = array();}
on application/modules/wordpress/wp-admin/includes/plugin.php:2047
if(isset($_wp_menu_nopriv)) {
foreach (array_keys($_wp_submenu_nopriv) as $key) {
if (isset($_wp_submenu_nopriv[$key][$pagenow])) {
return false;
}
if (isset($plugin_page) && isset($_wp_submenu_nopriv[$key][$plugin_page])) {
return false;
}
}
}
*/
echo $app->load('wordpress'); die();
$templateData = array('app' => $app);

0
application/include/modeles/accueil.model Executable file → Normal file
View file

0
application/include/modeles/authentification.model Executable file → Normal file
View file

0
application/include/modeles/compte.model Executable file → Normal file
View file

0
application/include/modeles/error.model Executable file → Normal file
View file

View file

@ -0,0 +1,5 @@
name : prestashop
page_title : Accueil de l'application modulaire
description : zatou stra bracadabla
params : params

0
application/include/modeles/syf43.model Executable file → Normal file
View file

0
application/include/modeles/syf51.model Executable file → Normal file
View file

View file

@ -0,0 +1,7 @@
name : wordpress
page_title : Accueil de l'application modulaire
description : zatou stra bracadabla
params : params
if(!is_array($menu)){$menu = array();}

0
application/include/vues/cache/.gitignore vendored Executable file → Normal file
View file

0
application/include/vues/layout/body.blade.php Executable file → Normal file
View file

0
application/include/vues/system/system.blade.php Executable file → Normal file
View file

0
application/include/vues/view/accueil.blade.php Executable file → Normal file
View file

0
application/include/vues/view/action.blade.php Executable file → Normal file
View file

View file

0
application/include/vues/view/compte.blade.php Executable file → Normal file
View file

0
application/include/vues/view/error.blade.php Executable file → Normal file
View file

0
application/include/vues/view/foo.blade.php Executable file → Normal file
View file

View file

@ -0,0 +1 @@
{{$app->load('prestashop')}}

0
application/include/vues/view/syf43.blade.php Executable file → Normal file
View file

0
application/include/vues/view/syf51.blade.php Executable file → Normal file
View file

View file

@ -0,0 +1 @@
{{$app->load('wordpress')}}

0
application/logs/hybridauth.log Executable file → Normal file
View file

4
application/modules/setup/registre.model Executable file → Normal file
View file

@ -1,2 +1,4 @@
syf43 : Application permettant de tester l'intégration d'un module avec symfony4.3
syf51 : Application permettant de tester l'intégration d'un module avec symfony5.0.99
syf51 : Application permettant de tester l'intégration d'un module avec symfony5.0.99
wordpress : Application permettant de générer un blog wordpress
prestashop : Application permettant de générer une site e-commerce prestashop

0
application/modules/syf43/.env Executable file → Normal file
View file

0
application/modules/syf43/.gitignore vendored Executable file → Normal file
View file

0
application/modules/syf43/bin/console Executable file → Normal file
View file

0
application/modules/syf43/composer.json Executable file → Normal file
View file

0
application/modules/syf43/composer.lock generated Executable file → Normal file
View file

0
application/modules/syf43/config/bootstrap.php Executable file → Normal file
View file

0
application/modules/syf43/config/bundles.php Executable file → Normal file
View file

0
application/modules/syf43/config/packages/cache.yaml Executable file → Normal file
View file

View file

View file

0
application/modules/syf43/config/packages/routing.yaml Executable file → Normal file
View file

View file

View file

View file

0
application/modules/syf43/config/packages/twig.yaml Executable file → Normal file
View file

0
application/modules/syf43/config/routes.yaml Executable file → Normal file
View file

View file

0
application/modules/syf43/config/routes/dev/twig.yaml Executable file → Normal file
View file

0
application/modules/syf43/config/services.yaml Executable file → Normal file
View file

0
application/modules/syf43/public/index.php Executable file → Normal file
View file

0
application/modules/syf43/src/Controller/.gitignore vendored Executable file → Normal file
View file

View file

0
application/modules/syf43/src/Kernel.php Executable file → Normal file
View file

0
application/modules/syf43/symfony.lock Executable file → Normal file
View file

0
application/modules/syf43/templates/base.html.twig Executable file → Normal file
View file

View file

View file

0
application/modules/syf51/.env Executable file → Normal file
View file

0
application/modules/syf51/.env.test Executable file → Normal file
View file

0
application/modules/syf51/.gitignore vendored Executable file → Normal file
View file

0
application/modules/syf51/bin/console Executable file → Normal file
View file

0
application/modules/syf51/bin/phpunit Executable file → Normal file
View file

0
application/modules/syf51/composer.json Executable file → Normal file
View file

0
application/modules/syf51/composer.lock generated Executable file → Normal file
View file

0
application/modules/syf51/config/bootstrap.php Executable file → Normal file
View file

Some files were not shown because too many files have changed in this diff Show more