-
-
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.
- Loading branch information
1 parent
162915a
commit f04dcf7
Showing
19 changed files
with
5,649 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "biurad/slim-framework", | ||
"description": "A professional made easy framework for web development", | ||
"keywords": [ | ||
"biurad slim framework", | ||
"radion", | ||
"biurad", | ||
"php-framework", | ||
"php framework", | ||
"framework", | ||
"php 7", | ||
"hhvm" | ||
], | ||
"license": "MIT", | ||
"type": "project", | ||
"authors": [{ | ||
"name": "BiuStudio", | ||
"email": "[email protected]", | ||
"homepage": "https://slim.biurad.ml", | ||
"role": "Developer" | ||
}], | ||
"require": { | ||
"php": ">=5.6.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Radion\\": "src/" | ||
} | ||
} | ||
} |
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,95 @@ | ||
<?php | ||
/* | ||
This code is under MIT License | ||
+--------------------------------+ | ||
| DO NOT MODIFY THIS HEADERS | | ||
+--------------------------------+-----------------+ | ||
| Created by BiuStudio | | ||
| Email: [email protected] | | ||
| Link: https://www.biurad.ml | | ||
| Source: https://github.com/biustudios/ | | ||
| Real Name: Divine Niiquaye - Ghana | | ||
| Copyright Copyright (c) 2018-2019 BiuStudio | | ||
| License: https://biurad.ml/LICENSE.md | | ||
+--------------------------------------------------+ | ||
+--------------------------------------------------------------------------------+ | ||
| Version: 0.0.1.1, Relased at 18/02/2019 13:13 (GMT + 1.00) | | ||
+--------------------------------------------------------------------------------+ | ||
+----------------+ | ||
| Tested on | | ||
+----------------+-----+ | ||
| APACHE => 2.0.55 | | ||
| PHP => 5.4 | | ||
+----------------------+ | ||
+---------------------+ | ||
| How to report bug | | ||
+---------------------+-----------------------------------------------------------------+ | ||
| You can e-mail me using the email addres written above. That email is also my msn | | ||
| contact, so you can use it for contact me on MSN. | | ||
+---------------------------------------------------------------------------------------+ | ||
+-----------+ | ||
| Notes | | ||
+-----------+------------------------------------------------------------------------------------------------+ | ||
| - BiuRad's simple-as-possible architecture was inspired by several conference talks, slides | | ||
| and articles about php frameworks that - surprisingly and intentionally - | | ||
| go back to the basics of programming, using procedural programming, static classes, | | ||
| extremely simple constructs, not-totally-DRY code etc. while keeping the code extremely readable. | | ||
| - Features of Biuraad Php Framework | ||
| +--> Proper security features, like CSRF blocking (via form tokens), encryption of cookie contents etc.| | ||
| +--> Built with the official PHP password hashing functions, fitting the most modern password | | ||
hashing/salting web standards. | | ||
| +--> Uses [Post-Redirect-Get pattern](https://en.wikipedia.org/wiki/Post/Redirect/Get) | | ||
| <--+ Uses URL rewriting ("beautiful URLs"). | | ||
| - Masses of comments | | | ||
| +--> Uses Libraries including Composer to load external dependencies. | | ||
| <--+ Proper security features, like CSRF blocking (via form tokens), encryption of cookie contents etc.| | ||
| - Fits PSR-0/1/2/4 coding guideline. | | ||
+------------------------------------------------------------------------------------------------------------+ | ||
+------------------+ | ||
| Special Thanks | | ||
+------------------+-----------------------------------------------------------------------------------------+ | ||
| I always thank the HTML FORUM COMMUNITY (http://www.html.it) for the advice about the regular expressions | | ||
| A special thanks at github.com(http://www.github.com), because they provide me the list of php libraries, | | ||
| snippets, and any more... | | ||
| I thanks Php.net and Sololearn.com for its guildline in PHP Programming | | ||
| Finally, i thank Wikipedia for the countries's icons 20px | | ||
+------------------------------------------------------------------------------------------------------------+ | ||
*/ | ||
namespace Radion; | ||
|
||
/** | ||
* The Alias Manager | ||
* ----------------------------------------------------------------------- | ||
* | ||
* Register the array of class aliases when this application | ||
* is started. | ||
* | ||
*/ | ||
class AliasManager | ||
{ | ||
private static $config = null; | ||
|
||
/** | ||
* Reads the configuration file (config/aliases.php) and create the | ||
* alias. | ||
* | ||
* @static | ||
* | ||
*/ | ||
public static function loadAliases() | ||
{ | ||
if (self::$config === null) { | ||
self::$config = ConfigManager::_get('aliases'); | ||
} | ||
|
||
foreach (self::$config as $class => $alias) { | ||
class_alias($class, $alias); | ||
} | ||
} | ||
} |
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,142 @@ | ||
<?php | ||
/* | ||
This code is under MIT License | ||
+--------------------------------+ | ||
| DO NOT MODIFY THIS HEADERS | | ||
+--------------------------------+-----------------+ | ||
| Created by BiuStudio | | ||
| Email: [email protected] | | ||
| Link: https://www.biurad.ml | | ||
| Source: https://github.com/biustudios/ | | ||
| Real Name: Divine Niiquaye - Ghana | | ||
| Copyright Copyright (c) 2018-2019 BiuStudio | | ||
| License: https://biurad.ml/LICENSE.md | | ||
+--------------------------------------------------+ | ||
+--------------------------------------------------------------------------------+ | ||
| Version: 0.0.1.1, Relased at 18/02/2019 13:13 (GMT + 1.00) | | ||
+--------------------------------------------------------------------------------+ | ||
+----------------+ | ||
| Tested on | | ||
+----------------+-----+ | ||
| APACHE => 2.0.55 | | ||
| PHP => 5.4 | | ||
+----------------------+ | ||
+---------------------+ | ||
| How to report bug | | ||
+---------------------+-----------------------------------------------------------------+ | ||
| You can e-mail me using the email addres written above. That email is also my msn | | ||
| contact, so you can use it for contact me on MSN. | | ||
+---------------------------------------------------------------------------------------+ | ||
+-----------+ | ||
| Notes | | ||
+-----------+------------------------------------------------------------------------------------------------+ | ||
| - BiuRad's simple-as-possible architecture was inspired by several conference talks, slides | | ||
| and articles about php frameworks that - surprisingly and intentionally - | | ||
| go back to the basics of programming, using procedural programming, static classes, | | ||
| extremely simple constructs, not-totally-DRY code etc. while keeping the code extremely readable. | | ||
| - Features of Biuraad Php Framework | ||
| +--> Proper security features, like CSRF blocking (via form tokens), encryption of cookie contents etc.| | ||
| +--> Built with the official PHP password hashing functions, fitting the most modern password | | ||
hashing/salting web standards. | | ||
| +--> Uses [Post-Redirect-Get pattern](https://en.wikipedia.org/wiki/Post/Redirect/Get) | | ||
| <--+ Uses URL rewriting ("beautiful URLs"). | | ||
| - Masses of comments | | | ||
| +--> Uses Libraries including Composer to load external dependencies. | | ||
| <--+ Proper security features, like CSRF blocking (via form tokens), encryption of cookie contents etc.| | ||
| - Fits PSR-0/1/2/4 coding guideline. | | ||
+------------------------------------------------------------------------------------------------------------+ | ||
+------------------+ | ||
| Special Thanks | | ||
+------------------+-----------------------------------------------------------------------------------------+ | ||
| I always thank the HTML FORUM COMMUNITY (http://www.html.it) for the advice about the regular expressions | | ||
| A special thanks at github.com(http://www.github.com), because they provide me the list of php libraries, | | ||
| snippets, and any more... | | ||
| I thanks Php.net and Sololearn.com for its guildline in PHP Programming | | ||
| Finally, i thank Wikipedia for the countries's icons 20px | | ||
+------------------------------------------------------------------------------------------------------------+ | ||
*/ | ||
namespace Radion; | ||
|
||
class Bootstrap | ||
{ | ||
/** | ||
* Module list available | ||
* @var Array Module Array | ||
*/ | ||
private $modulesList = []; | ||
|
||
/** | ||
* Application constructor | ||
* @param boolean $loadmodules If load module or just access to config data | ||
*/ | ||
public function __construct($loadmodules = false){ | ||
|
||
$this->loadPlatform(); | ||
|
||
// If loadmodule, load modules | ||
if($loadmodules) $this->loadModules(); | ||
|
||
} | ||
|
||
public function loadPlatform(){ | ||
set_time_limit(180); | ||
if(true){ | ||
ini_set('display_errors', 0); | ||
ini_set('display_startup_errors', 0); | ||
error_reporting(0); | ||
} else { | ||
ini_set('display_errors', 1); | ||
ini_set('display_startup_errors', 1); | ||
error_reporting(-1); | ||
} | ||
} | ||
|
||
/** | ||
* Load module function | ||
*/ | ||
public function loadModules(){ | ||
|
||
// Get list modules available in application | ||
foreach (scandir(BR_PATH.'Libraries') as $directory) { | ||
|
||
// Check if file is an file | ||
if($directory == "." || $directory == "..") continue; | ||
|
||
// Get directory path | ||
$directoryPath = BR_PATH.'Libraries/'.$directory; | ||
|
||
// Check if file parsed is a directory (module need to be a directory) | ||
if(!is_dir($directoryPath)){ | ||
|
||
// Save error in log file | ||
error_log('Fail to load module : '.$directory.' --> is not a directory'); | ||
continue; | ||
} | ||
|
||
// Load module | ||
$ModuleLoad = new LoadManager($directory); | ||
|
||
// Check module configuratino file | ||
if(!$ModuleLoad->checkConfig()){ | ||
|
||
// Save error in log file | ||
error_log('Fail to load module : '.$directory.' --> wrong configuration'); | ||
continue; | ||
} | ||
|
||
// Check if module is enabled | ||
if($ModuleLoad->isEnable()){ | ||
// If enabled, save in module list | ||
$this->modulesList[$directory] = $ModuleLoad; | ||
if(!file_exists($this->getModulePath().'/autoload.php')) throw new ExceptionManager("Error : Autoload file not exist for this library : ".$this->getDirectory(), 1); | ||
require ($this->getModulePath().'/autoload.php'); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.