-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SYSTEM REWRITE : FIRST RELEASE -> 1.1.0
- Loading branch information
Louis Bertrand
committed
Jul 27, 2019
1 parent
f15d434
commit 8653c26
Showing
236 changed files
with
25,621 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,36 @@ | ||
<?php | ||
|
||
// PHP ENVIRONEMENT SETUP | ||
define("debug",true); | ||
$debugMask[]="ERROR"; | ||
// $debugMask[]="INFOS"; | ||
$debugMask[]="WARNS"; | ||
|
||
define("PHPENV_LibrariesDIR", "libraries"); | ||
define("PHPENV_LibrariesDatabase", PHPENV_LibrariesDIR."/libraries.ini"); | ||
if (debug && in_array("INFOS",$debugMask)) { | ||
print "ENV SETUP\r\n\r\n"; | ||
} | ||
|
||
$libraries = parse_ini_file(PHPENV_LibrariesDatabase,true); | ||
$env_ = json_decode(file_get_contents("env.json"), true); | ||
|
||
define("yt.pylott.keyphp.base", PHPENV_LibrariesDIR."/".$libraries["libraries"]["yt.pylott.keyphp.base"]); | ||
define("appInfosPath","appInfos.json"); | ||
define("environnementPrefix",$env_["EnvOutputPrefix"]); | ||
|
||
require_once(constant("yt.pylott.keyphp.base")); | ||
if (debug && in_array("INFOS",$debugMask)) { | ||
|
||
// 1.0.1.BETA feature : #0001 : appSettingsFile | ||
// application datas will come from a .ini file | ||
print environnementPrefix."ENV Name: ".$env_["Name"]."\r\n"; | ||
print environnementPrefix."ENV Version: ".$env_["Version"]."\r\n"; | ||
print environnementPrefix."ENV Authors: "."\r\n"; | ||
print_r($env_["Authors"]); | ||
print environnementPrefix."ENV PackageID: ".$env_["PackageID"]."\r\n"; | ||
print "\r\n\r\n"; | ||
|
||
$GLOBAL_appSettings = parse_ini_file("conf/appSettings.ini", true); | ||
} | ||
|
||
// var_dump($GLOBAL_appSettings); | ||
// exit; | ||
$appInfos = json_decode(file_get_contents(appInfosPath)); | ||
|
||
$GLOBAL_packageID = $GLOBAL_appSettings["AppInfosHolder"]["packageID"]; | ||
$GLOBAL_infos = $GLOBAL_appSettings["AppInfosHolder"]["infos"]; | ||
$GLOBAL_author = $GLOBAL_appSettings["AppInfosHolder"]["author"]; | ||
$GLOBAL_version = $GLOBAL_appSettings["AppInfosHolder"]["version"]; | ||
$GLOBAL_mainClass = $GLOBAL_appSettings["AppInfosHolder"]["mainClass"]; | ||
|
||
// end of 1.0.1.BETA feature : #0001 : appSettingsFile | ||
|
||
require_once("application.php"); | ||
$autoLoad = require('autoload.php'); | ||
if ($autoLoad) { | ||
$application = require('application.php'); | ||
} else { | ||
print "\033[0;31mFATAL ERROR: AUTOLOAD FAILED [0X2000]\r\nABORTING\r\n\033[m"; | ||
return 1; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (c) Nils Adermann, Jordi Boggiano | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is furnished | ||
to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
|
||
"appName":"KeyPHP WITH COMPOSER COMPATIBILITY", | ||
"mainClass":"main", | ||
"infos":"A RELEASE VERSION OF KeyPHP WITH COMPOSER COMPATIBILITY", | ||
"authors": | ||
[ | ||
"Louis Bertrand <adressepro111@pylott.yt>" | ||
], | ||
"License":"MIT", | ||
"version":"1.1.0", | ||
"packageName":"yt.pylott.keyPHP", | ||
"CompilationTarget": | ||
{ | ||
"MACOS": | ||
[ | ||
|
||
"10.9.*", | ||
"10.10.*", | ||
"10.11.*", | ||
"10.12.*", | ||
"10.13.*", | ||
"10.14.*" | ||
|
||
], | ||
"WINDOWS": | ||
[ | ||
|
||
"7.*", | ||
"8.*", | ||
"10.*" | ||
|
||
], | ||
"LINUX": | ||
[ | ||
|
||
"*" | ||
|
||
] | ||
}, | ||
"Lang":"EN-UK/US" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?php | ||
|
||
if (debug && in_array("INFOS",$debugMask)) {print environnementPrefix."Importing KeyPHP Libraries\r\n";} | ||
|
||
if(!is_dir("libraries")){ | ||
|
||
if (debug && in_array("ERROR", $debugMask)) { | ||
print "\033[0;31mFATAL ERROR: LIBRARIES FOLDER DOESN'T EXIST. [0X2001]\r\n\033[m"; | ||
print "\033[0;31m TO REPAIRE, TYPE\r\n\033[m"; | ||
print "\e[3mmkdir libraries\r\n"; | ||
print "make Download_Basic_Libraries\r\n\033[m"; | ||
} | ||
return false; | ||
|
||
} | ||
|
||
$LibDir = scandir("libraries"); | ||
|
||
// AUTO LOAD OF KEYPHP LIBRARIES | ||
|
||
foreach ($LibDir as $key => $value) { | ||
if ($value != "." && $value != "..") { | ||
if (file_exists("libraries/".$value."/".$value.".php")) { | ||
require "libraries/".$value."/".$value.".php"; | ||
if (debug && in_array("INFOS",$debugMask)) { | ||
echo environnementPrefix."\033[0;32mLIBRARY \"".$value."\" LOADING: SUCCESS\r\n\033[m"; | ||
} | ||
} elseif (file_exists("libraries/".$value."/loader.php")) { | ||
require "libraries/".$value."/loader.php"; | ||
if (debug && in_array("INFOS",$debugMask)) { | ||
echo environnementPrefix."\033[0;32mLIBRARY \"".$value."\" LOADING: SUCCESS\r\n\033[m"; | ||
} | ||
} else { | ||
if (file_exists("libraries/".$value."/infos.ini")) { | ||
$clibinfos=parse_ini_file("libraries/".$value."/infos.ini",true); | ||
if (isset($clibinfos["infos"]["loaderFileName"])) { | ||
if (file_exists("libraries/".$value."/".$clibinfos["loaderFileName"].".php")) { | ||
require "libraries/".$value."/".$clibinfos["loaderFileName"].".php"; | ||
if (debug && in_array("INFOS",$debugMask)) { | ||
echo environnementPrefix."\033[0;32mLIBRARY \"".$value."\" LOADING: SUCCESS\r\n\033[m"; | ||
} | ||
} else { | ||
if (debug && in_array("ERROR", $debugMask)) { | ||
print environnementPrefix."\033[0;31mERROR: UNABLE TO LOAD LIBRARY \"".$value."\" MISSING LOADER FILE\r\n\033[m"; | ||
} | ||
} | ||
} else { | ||
if (debug && in_array("ERROR", $debugMask)) { | ||
print environnementPrefix."\033[0;31mERROR: UNABLE TO LOAD LIBRARY \"".$value."\" MISSING LOADER FILE IN INFOS.INI\r\n\033[m"; | ||
} | ||
} | ||
} elseif (file_exists("libraries/".$value."/infos.json")) { | ||
$clibinfos=json_decode(file_get_contents("libraries/".$value."/infos.json",true)); | ||
if (isset($clibinfos["infos"]["loaderFileName"])) { | ||
if (file_exists("libraries/".$value."/".$clibinfos["loaderFileName"].".php")) { | ||
require "libraries/".$value."/".$clibinfos["loaderFileName"].".php"; | ||
if (debug && in_array("INFOS", $debugMask)) { | ||
echo environnementPrefix."\033[0;32mLIBRARY \"".$value."\" LOADING: SUCCESS\r\n\033[m"; | ||
} | ||
} else { | ||
if (debug && in_array("ERROR", $debugMask)) { | ||
print environnementPrefix."\033[0;31mERROR: UNABLE TO LOAD LIBRARY \"".$value."\" MISSING LOADER FILE\r\n\033[m"; | ||
}} | ||
} else { | ||
if (debug && in_array("ERROR", $debugMask)) { | ||
print environnementPrefix."\033[0;31mERROR: UNABLE TO LOAD LIBRARY \"".$value."\" MISSING LOADER FILE IN INFOS.JSON\r\n\033[m"; | ||
}} | ||
} elseif( !is_dir("libraries/".$value) ) { | ||
|
||
// Ignore | ||
|
||
} else { | ||
if (debug && in_array("ERROR", $debugMask)) { | ||
print environnementPrefix."\033[0;31mERROR: UNABLE TO LOAD LIBRARY \"".$value."\" MISSING INFOS.INI FILE OR LOADER FILE\r\n\033[m"; | ||
}} | ||
} | ||
} | ||
} | ||
|
||
// AUTO LOAD OF COMPOSER LIBRARIES | ||
|
||
if (file_exists("vendor/autoload.php")) { | ||
$vendorAutoLoad = require "vendor/autoload.php"; | ||
} else { | ||
if (debug && in_array("WARNS", $debugMask)) { | ||
echo environnementPrefix."\033[0;33mFile 'vendor/autoload.php' can't be find, Ignoring.\r\n\033[m"; | ||
} | ||
} | ||
|
||
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"require": { | ||
"monolog/monolog": "^1.24" | ||
} | ||
} |
Oops, something went wrong.