SAND-framework/console/bin.php
Emmanuel ROY 68f87c9750 ajout du layout polo
TODO: créé les pages de blog (sommaire,news) permettant d'afficher les fichiers md
2020-04-14 08:26:59 +02:00

22 lines
No EOL
635 B
PHP
Executable file

#!/usr/bin/php
<?php
//var_dump($argv);
define("VENDOR_PATH", dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR."vendor");
require VENDOR_PATH.DIRECTORY_SEPARATOR."autoload.php";
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";
}