Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Improments to Init Class #224

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading