Ajout et tests des modules Wordpress et Prestashop
Installation finalisée pour wordpress Installation en erreur pour Prestashop
This commit is contained in:
parent
21073bb54e
commit
21ec903fa9
0
application/class/Application.php
Executable file → Normal file
0
application/class/Application.php
Executable file → Normal file
0
application/class/Asynchonous.php
Executable file → Normal file
0
application/class/Asynchonous.php
Executable file → Normal file
0
application/class/Bdd.php
Executable file → Normal file
0
application/class/Bdd.php
Executable file → Normal file
0
application/class/Browser.php
Executable file → Normal file
0
application/class/Browser.php
Executable file → Normal file
0
application/class/Caracter.php
Executable file → Normal file
0
application/class/Caracter.php
Executable file → Normal file
0
application/class/Controlleur.php
Executable file → Normal file
0
application/class/Controlleur.php
Executable file → Normal file
0
application/class/ControlleurAction.php
Executable file → Normal file
0
application/class/ControlleurAction.php
Executable file → Normal file
0
application/class/Dispacher.php
Executable file → Normal file
0
application/class/Dispacher.php
Executable file → Normal file
0
application/class/Dumper.php
Executable file → Normal file
0
application/class/Dumper.php
Executable file → Normal file
0
application/class/HttpMethod.php
Executable file → Normal file
0
application/class/HttpMethod.php
Executable file → Normal file
0
application/class/HttpMethodRequete.php
Executable file → Normal file
0
application/class/HttpMethodRequete.php
Executable file → Normal file
0
application/class/Implement/Action.php
Executable file → Normal file
0
application/class/Implement/Action.php
Executable file → Normal file
0
application/class/Implement/Conduit.php
Executable file → Normal file
0
application/class/Implement/Conduit.php
Executable file → Normal file
0
application/class/Implement/Contrat/HttpReponseInterface.php
Executable file → Normal file
0
application/class/Implement/Contrat/HttpReponseInterface.php
Executable file → Normal file
0
application/class/Implement/Contrat/RestReponseInterface.php
Executable file → Normal file
0
application/class/Implement/Contrat/RestReponseInterface.php
Executable file → Normal file
0
application/class/Implement/HttpReponse.php
Executable file → Normal file
0
application/class/Implement/HttpReponse.php
Executable file → Normal file
0
application/class/Implement/RestReponse.php
Executable file → Normal file
0
application/class/Implement/RestReponse.php
Executable file → Normal file
0
application/class/Logger.php
Executable file → Normal file
0
application/class/Logger.php
Executable file → Normal file
0
application/class/Modele.php
Executable file → Normal file
0
application/class/Modele.php
Executable file → Normal file
60
application/class/Modular.php
Executable file → Normal file
60
application/class/Modular.php
Executable file → Normal 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(){
|
||||
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
0
application/class/ModularRegister.php
Executable file → Normal file
0
application/class/Session.php
Executable file → Normal file
0
application/class/Session.php
Executable file → Normal file
0
application/class/Tri.php
Executable file → Normal file
0
application/class/Tri.php
Executable file → Normal file
25
application/class/Url.php
Executable file → Normal file
25
application/class/Url.php
Executable file → Normal file
|
@ -56,24 +56,41 @@ 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 ) {
|
||||
// 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;
|
||||
$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) {
|
||||
foreach ($urlParts as $key => $value) {
|
||||
if ($key % 2 == 0) {
|
||||
$values[] = $value;
|
||||
} else {
|
||||
$keys[] = $value;
|
||||
}
|
||||
}
|
||||
if($page['control']){
|
||||
if ($page['control']) {
|
||||
$page['params'] = array_combine($values, $keys);
|
||||
}else {
|
||||
} else {
|
||||
$page['params'] = array_combine($keys, $values);
|
||||
}
|
||||
}
|
||||
}
|
||||
//verification de l'existence de la page dans les controlleurs
|
||||
if($page['control']){
|
||||
$pageFile = TRAITEMENT_PATH . DIRECTORY_SEPARATOR . $page['name'] . '.php';
|
||||
|
|
0
application/class/Vue.php
Executable file → Normal file
0
application/class/Vue.php
Executable file → Normal file
0
application/class/VueVide.php
Executable file → Normal file
0
application/class/VueVide.php
Executable file → Normal file
0
application/config/authentification-config-example.php
Executable file → Normal file
0
application/config/authentification-config-example.php
Executable file → Normal file
0
application/config/define-constantes.php
Executable file → Normal file
0
application/config/define-constantes.php
Executable file → Normal file
0
application/config/files/routing.yml
Executable file → Normal file
0
application/config/files/routing.yml
Executable file → Normal file
0
application/include/actions/DefaultAction.php
Executable file → Normal file
0
application/include/actions/DefaultAction.php
Executable file → Normal file
0
application/include/conduits/FooConduit.php
Executable file → Normal file
0
application/include/conduits/FooConduit.php
Executable file → Normal file
0
application/include/controlleurs/AccueilHttpReponse.php
Executable file → Normal file
0
application/include/controlleurs/AccueilHttpReponse.php
Executable file → Normal file
0
application/include/controlleurs/ErrorHttpReponse.php
Executable file → Normal file
0
application/include/controlleurs/ErrorHttpReponse.php
Executable file → Normal file
0
application/include/controlleurs/accueil.php
Executable file → Normal file
0
application/include/controlleurs/accueil.php
Executable file → Normal file
0
application/include/controlleurs/authentification.php
Executable file → Normal file
0
application/include/controlleurs/authentification.php
Executable file → Normal file
0
application/include/controlleurs/compte.php
Executable file → Normal file
0
application/include/controlleurs/compte.php
Executable file → Normal file
0
application/include/controlleurs/error.php
Executable file → Normal file
0
application/include/controlleurs/error.php
Executable file → Normal file
5
application/include/controlleurs/prestashop.php
Normal file
5
application/include/controlleurs/prestashop.php
Normal 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
0
application/include/controlleurs/syf43.php
Executable file → Normal file
0
application/include/controlleurs/syf51.php
Executable file → Normal file
0
application/include/controlleurs/syf51.php
Executable file → Normal file
29
application/include/controlleurs/wordpress.php
Normal file
29
application/include/controlleurs/wordpress.php
Normal 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
0
application/include/modeles/accueil.model
Executable file → Normal file
0
application/include/modeles/authentification.model
Executable file → Normal file
0
application/include/modeles/authentification.model
Executable file → Normal file
0
application/include/modeles/compte.model
Executable file → Normal file
0
application/include/modeles/compte.model
Executable file → Normal file
0
application/include/modeles/error.model
Executable file → Normal file
0
application/include/modeles/error.model
Executable file → Normal file
5
application/include/modeles/prestashop.model
Normal file
5
application/include/modeles/prestashop.model
Normal 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
0
application/include/modeles/syf43.model
Executable file → Normal file
0
application/include/modeles/syf51.model
Executable file → Normal file
0
application/include/modeles/syf51.model
Executable file → Normal file
7
application/include/modeles/wordpress.model
Normal file
7
application/include/modeles/wordpress.model
Normal 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
0
application/include/vues/cache/.gitignore
vendored
Executable file → Normal file
0
application/include/vues/layout/body.blade.php
Executable file → Normal file
0
application/include/vues/layout/body.blade.php
Executable file → Normal file
0
application/include/vues/system/system.blade.php
Executable file → Normal file
0
application/include/vues/system/system.blade.php
Executable file → Normal file
0
application/include/vues/view/accueil.blade.php
Executable file → Normal file
0
application/include/vues/view/accueil.blade.php
Executable file → Normal file
0
application/include/vues/view/action.blade.php
Executable file → Normal file
0
application/include/vues/view/action.blade.php
Executable file → Normal file
0
application/include/vues/view/authentification.blade.php
Executable file → Normal file
0
application/include/vues/view/authentification.blade.php
Executable file → Normal file
0
application/include/vues/view/compte.blade.php
Executable file → Normal file
0
application/include/vues/view/compte.blade.php
Executable file → Normal file
0
application/include/vues/view/error.blade.php
Executable file → Normal file
0
application/include/vues/view/error.blade.php
Executable file → Normal file
0
application/include/vues/view/foo.blade.php
Executable file → Normal file
0
application/include/vues/view/foo.blade.php
Executable file → Normal file
1
application/include/vues/view/prestashop.blade.php
Normal file
1
application/include/vues/view/prestashop.blade.php
Normal file
|
@ -0,0 +1 @@
|
|||
{{$app->load('prestashop')}}
|
0
application/include/vues/view/syf43.blade.php
Executable file → Normal file
0
application/include/vues/view/syf43.blade.php
Executable file → Normal file
0
application/include/vues/view/syf51.blade.php
Executable file → Normal file
0
application/include/vues/view/syf51.blade.php
Executable file → Normal file
1
application/include/vues/view/wordpress.blade.php
Normal file
1
application/include/vues/view/wordpress.blade.php
Normal file
|
@ -0,0 +1 @@
|
|||
{{$app->load('wordpress')}}
|
0
application/logs/hybridauth.log
Executable file → Normal file
0
application/logs/hybridauth.log
Executable file → Normal file
2
application/modules/setup/registre.model
Executable file → Normal file
2
application/modules/setup/registre.model
Executable file → Normal 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
|
||||
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
0
application/modules/syf43/.env
Executable file → Normal file
0
application/modules/syf43/.gitignore
vendored
Executable file → Normal file
0
application/modules/syf43/.gitignore
vendored
Executable file → Normal file
0
application/modules/syf43/bin/console
Executable file → Normal file
0
application/modules/syf43/bin/console
Executable file → Normal file
0
application/modules/syf43/composer.json
Executable file → Normal file
0
application/modules/syf43/composer.json
Executable file → Normal file
0
application/modules/syf43/composer.lock
generated
Executable file → Normal file
0
application/modules/syf43/composer.lock
generated
Executable file → Normal file
0
application/modules/syf43/config/bootstrap.php
Executable file → Normal file
0
application/modules/syf43/config/bootstrap.php
Executable file → Normal file
0
application/modules/syf43/config/bundles.php
Executable file → Normal file
0
application/modules/syf43/config/bundles.php
Executable file → Normal file
0
application/modules/syf43/config/packages/cache.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/cache.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/dev/routing.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/dev/routing.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/framework.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/framework.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/routing.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/routing.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/sensio_framework_extra.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/sensio_framework_extra.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/test/framework.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/test/framework.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/test/routing.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/test/routing.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/twig.yaml
Executable file → Normal file
0
application/modules/syf43/config/packages/twig.yaml
Executable file → Normal file
0
application/modules/syf43/config/routes.yaml
Executable file → Normal file
0
application/modules/syf43/config/routes.yaml
Executable file → Normal file
0
application/modules/syf43/config/routes/annotations.yaml
Executable file → Normal file
0
application/modules/syf43/config/routes/annotations.yaml
Executable file → Normal file
0
application/modules/syf43/config/routes/dev/twig.yaml
Executable file → Normal file
0
application/modules/syf43/config/routes/dev/twig.yaml
Executable file → Normal file
0
application/modules/syf43/config/services.yaml
Executable file → Normal file
0
application/modules/syf43/config/services.yaml
Executable file → Normal file
0
application/modules/syf43/public/index.php
Executable file → Normal file
0
application/modules/syf43/public/index.php
Executable file → Normal file
0
application/modules/syf43/src/Controller/.gitignore
vendored
Executable file → Normal file
0
application/modules/syf43/src/Controller/.gitignore
vendored
Executable file → Normal file
0
application/modules/syf43/src/Controller/DefaultController.php
Executable file → Normal file
0
application/modules/syf43/src/Controller/DefaultController.php
Executable file → Normal file
0
application/modules/syf43/src/Kernel.php
Executable file → Normal file
0
application/modules/syf43/src/Kernel.php
Executable file → Normal file
0
application/modules/syf43/symfony.lock
Executable file → Normal file
0
application/modules/syf43/symfony.lock
Executable file → Normal file
0
application/modules/syf43/templates/base.html.twig
Executable file → Normal file
0
application/modules/syf43/templates/base.html.twig
Executable file → Normal file
0
application/modules/syf43/templates/default/index.html.twig
Executable file → Normal file
0
application/modules/syf43/templates/default/index.html.twig
Executable file → Normal file
0
application/modules/syf43/templates/default/page.html.twig
Executable file → Normal file
0
application/modules/syf43/templates/default/page.html.twig
Executable file → Normal file
0
application/modules/syf51/.env
Executable file → Normal file
0
application/modules/syf51/.env
Executable file → Normal file
0
application/modules/syf51/.env.test
Executable file → Normal file
0
application/modules/syf51/.env.test
Executable file → Normal file
0
application/modules/syf51/.gitignore
vendored
Executable file → Normal file
0
application/modules/syf51/.gitignore
vendored
Executable file → Normal file
0
application/modules/syf51/bin/console
Executable file → Normal file
0
application/modules/syf51/bin/console
Executable file → Normal file
0
application/modules/syf51/bin/phpunit
Executable file → Normal file
0
application/modules/syf51/bin/phpunit
Executable file → Normal file
0
application/modules/syf51/composer.json
Executable file → Normal file
0
application/modules/syf51/composer.json
Executable file → Normal file
0
application/modules/syf51/composer.lock
generated
Executable file → Normal file
0
application/modules/syf51/composer.lock
generated
Executable file → Normal file
0
application/modules/syf51/config/bootstrap.php
Executable file → Normal file
0
application/modules/syf51/config/bootstrap.php
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue