Ajout d'un template pour les commandes console permettant de netooyer le cache et d'ajouter à la volé des modules déjà testé
TODO: créer les commandes complétement TODO: envoyer les bugs wordpress TODO: corriger le bug de création de la base de donnée pour prestashop
This commit is contained in:
parent
4e5dbc1e17
commit
bedf7ee0a2
|
@ -1,5 +1,13 @@
|
|||
<?php
|
||||
$app = new MVC\Classe\Modular($name,'prestashop',$url_params);
|
||||
//echo "Dawn Prestashop Error!";
|
||||
echo $app->load('prestashop');die();
|
||||
/*
|
||||
* Avoid Warning on my version ....
|
||||
*
|
||||
on application/modules/prestashop/config/config.inc.php:125
|
||||
|
||||
define('__PS_BASE_URI__', '/prestashop'.$context->shop->getBaseURI());
|
||||
|
||||
*/
|
||||
//echo $app->load('prestashop');die();
|
||||
$templateData = array('app' => $app);
|
|
@ -25,5 +25,5 @@ $app = new MVC\Classe\Modular($name,'wordpress',$url_params);
|
|||
*/
|
||||
|
||||
|
||||
echo $app->load('wordpress'); die();
|
||||
//echo $app->load('wordpress'); die();
|
||||
$templateData = array('app' => $app);
|
18
console/bin.php
Normal file
18
console/bin.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
//var_dump($argv);
|
||||
|
||||
if(isset($argv[1])) {
|
||||
$option = explode(':', $argv[1]);
|
||||
$command_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "command" . DIRECTORY_SEPARATOR . $option[0] . ".class.php";
|
||||
if (is_file($command_file)) {
|
||||
require $command_file;
|
||||
$class = $option[0];
|
||||
$static_method = $option[1];
|
||||
$class::$static_method();
|
||||
} else {
|
||||
print "Command not found !\n";
|
||||
}
|
||||
}else{
|
||||
print "No command was specified !\n";
|
||||
}
|
19
console/command/cache.class.php
Normal file
19
console/command/cache.class.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
|
||||
class cache
|
||||
{
|
||||
|
||||
static public function help(){
|
||||
print "explaination of the command\n\n";
|
||||
}
|
||||
|
||||
static public function clear(){
|
||||
print "cache cleared ! \n\n";
|
||||
}
|
||||
|
||||
static public function stabilize(){
|
||||
print "cache stabilized ! \n\n";
|
||||
}
|
||||
|
||||
}
|
62
console/command/module.class.php
Normal file
62
console/command/module.class.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
|
||||
class module
|
||||
{
|
||||
static public function help(){
|
||||
print "explaination of the command\n\n";
|
||||
}
|
||||
|
||||
static public function add(){
|
||||
print "adding module...\n\n";
|
||||
}
|
||||
|
||||
static public function remove(){
|
||||
print "removing module...\n\n";
|
||||
}
|
||||
|
||||
static private function addSymfony(){
|
||||
/*
|
||||
* composer create-project symfony/website-skeleton my_module_name
|
||||
*
|
||||
* add symbolic links (not necessary, it comes with the way you progam on sand-module)
|
||||
*
|
||||
* add controlleur method
|
||||
* add model file
|
||||
* add blade view
|
||||
*/
|
||||
}
|
||||
|
||||
static private function addWorpress(){
|
||||
/*
|
||||
* git clone https://github.com/WordPress/WordPress.git wordpress
|
||||
* git checkout -b actualdev origin:5.3-branch
|
||||
*
|
||||
* create database if not
|
||||
*
|
||||
* create wp-config.php
|
||||
* add symbolic links
|
||||
* add controlleur method
|
||||
* add model file
|
||||
* add blade view
|
||||
*/
|
||||
}
|
||||
|
||||
static private function addPrestashop(){
|
||||
/*
|
||||
* git clone https://github.com/PrestaShop/PrestaShop.git prestashop
|
||||
* git checkout -b actualdev tags:1.7.6.2
|
||||
*
|
||||
* create database if not
|
||||
*
|
||||
* modify the /config/config.inc.php
|
||||
* add symbolic links
|
||||
* add controlleur method
|
||||
* add model file
|
||||
* add blade view
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue