Skip to content

Commit

Permalink
Merge pull request #224 from WebFiori/dev
Browse files Browse the repository at this point in the history
refactor: Improments to Init Class
  • Loading branch information
usernane authored May 20, 2024
2 parents 1e4e6c2 + a480608 commit a815f94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions webfiori/framework/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ private function initAutoLoader() {
self::$AU = AutoLoader::get();

if (!class_exists(APP_DIR.'\ini\InitAutoLoad')) {
Ini::createAppDirs();
Ini::get()->createIniClass('InitAutoLoad', 'Add user-defined directories to the set of directories at which the framework will search for classes.');
}
call_user_func(APP_DIR.'\ini\InitAutoLoad::init');
Expand All @@ -542,7 +543,7 @@ private function initFrameworkVersionInfo() {
*
* @since 2.1
*/
define('WF_VERSION', '3.0.0-Beta.7');
define('WF_VERSION', '3.0.0-Beta.8');
/**
* A constant that tells the type of framework version.
*
Expand All @@ -558,7 +559,7 @@ private function initFrameworkVersionInfo() {
*
* @since 2.1
*/
define('WF_RELEASE_DATE', '2024-05-13');
define('WF_RELEASE_DATE', '2024-05-20');
}

/**
Expand Down
7 changes: 4 additions & 3 deletions webfiori/framework/Ini.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Ini {
private $docEmptyLine;
private $docEnd;
private $docStart;
private $since10;
/**
* An instance of the class.
*
Expand All @@ -34,6 +33,10 @@ class Ini {
*/
private static $singleton;
private function __construct() {
$this->docStart = '/**';
$this->docEnd = ' **/';
$this->docEmptyLine = " *";
$this->blockEnd = '}';
}


Expand Down Expand Up @@ -89,7 +92,6 @@ public function createIniClass(string $className, string $comment) {
$this->docStart,
" * $comment",
$this->docEmptyLine,
$this->since10,
$this->docEnd,
'public static function init() {'
], 1);
Expand Down Expand Up @@ -125,7 +127,6 @@ public function createRoutesClass(string $className) {
ClassDriver::a($cFile, $this->docStart, 1);
ClassDriver::a($cFile, " * Initialize system routes.");
ClassDriver::a($cFile, $this->docEmptyLine, 1);
ClassDriver::a($cFile, $this->since10, 1);
ClassDriver::a($cFile, $this->docEnd, 1);
ClassDriver::a($cFile, " public static function create() {");
ClassDriver::a($cFile, " //TODO: Add your own routes here.");
Expand Down

0 comments on commit a815f94

Please sign in to comment.