after 6 years update. hell yeah
This commit is contained in:
parent
7e1993730a
commit
bb3a611b7d
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
"name": "mirzaev/beejee",
|
||||
"description": "Test BeeJee",
|
||||
"description": "Task manager. MVC + CRUD. Developed in 2 days (2019)",
|
||||
"type": "project",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"license": "WTFPL",
|
||||
"homepage": "https://git.hood.su/mirzaev/beejee",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arsen Mirzaev Tatyano-Muradovich",
|
||||
"email": "red@hood.su",
|
||||
"email": "arsen@mirzaev.sexy",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.4.0",
|
||||
"ext-PDO": "^7.4",
|
||||
"php": ">=8.4.0",
|
||||
"ext-PDO": "^8.4",
|
||||
"twbs/bootstrap": "^4.5",
|
||||
"twig/twig": "^3.1"
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -39,6 +39,7 @@ class controller
|
|||
{
|
||||
// Установка значения по умолчанию для модели (если будет найдена)
|
||||
$this->__get('model');
|
||||
|
||||
// Установка значения по умолчанию для шаблонизатора представлений
|
||||
$this->__get('view');
|
||||
}
|
||||
|
@ -102,7 +103,8 @@ class controller
|
|||
return $this->model;
|
||||
} else {
|
||||
// Инициализация класса модели
|
||||
$model = preg_replace('/' . core::controllerPostfix() . '$/i', '', basename(get_class($this))) . core::modelPostfix();
|
||||
$model = preg_replace('/' . core::controllerPostfix() . '$/i', '', substr($this::class, strrpos($this::class, '\\') + 1)) . core::modelPostfix();
|
||||
|
||||
// Иначе
|
||||
if (class_exists($model_class = core::namespace() . '\\models\\' . $model)) {
|
||||
// Если найдена одноимённая с контроллером модель (без постфикса)
|
||||
|
|
|
@ -21,6 +21,8 @@ final class mainController extends controller
|
|||
{
|
||||
$tasks = new tasksController;
|
||||
|
||||
$params['page'] ??= '/';
|
||||
|
||||
// Нормализация
|
||||
$page['current'] = filter_var($params['page'], FILTER_SANITIZE_NUMBER_INT);
|
||||
$page['sort'] = filter_var($params['page'], FILTER_SANITIZE_STRING);
|
||||
|
|
|
@ -55,7 +55,7 @@ final class tasksController extends controller
|
|||
{
|
||||
// Нормализация
|
||||
$page['current'] = filter_var(filter_var($params['page'], FILTER_SANITIZE_NUMBER_INT), FILTER_VALIDATE_INT, ['options' => ['default' => 1]]);
|
||||
$page['sort'] = filter_var($params['sort'], FILTER_SANITIZE_STRING);
|
||||
$page['sort'] = filter_var($params['sort'] ?? '', FILTER_SANITIZE_STRING);
|
||||
|
||||
// Инициализация параметров
|
||||
$limit = 3;
|
||||
|
@ -142,6 +142,6 @@ final class tasksController extends controller
|
|||
*/
|
||||
public function count(): int
|
||||
{
|
||||
return $this->model->count();
|
||||
return $this->__get('model')->count();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace mirzaev\beejee\models;
|
||||
|
||||
use mirzaev\beejee\models\model;
|
||||
|
||||
use PDO;
|
||||
|
||||
/**
|
||||
* Бебра
|
||||
*
|
||||
* @package mirzaev\beejee\models
|
||||
* @author Arsen Mirzaev Tatyano-Muradovich <red@hood.su>
|
||||
*/
|
||||
final class mainModel extends model {}
|
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.min.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.min.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.min.css.map
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-grid.min.css.map
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.min.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.min.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.min.css.map
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap-reboot.min.css.map
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap.min.css
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/css/bootstrap/bootstrap.min.css
vendored
Normal file → Executable file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -25,4 +25,4 @@ router::create('deauth', 'auth', 'deauth', 'POST');
|
|||
router::create('auth', 'auth', 'genSidebarPanel', 'GET');
|
||||
router::create('reg', 'auth', 'reg', 'POST');
|
||||
|
||||
new Core('mysql:dbname=beejee;host=127.0.0.1', 'root', 'root');
|
||||
new Core('mysql:dbname=task_manager;unix_socket=/run/mysqld/mysqld.sock', login: 'magomed', password: 'varyeniki_besplatno_1988');
|
||||
|
|
0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.js
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.js
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.min.js
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.min.js
vendored
Normal file → Executable file
0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.min.js.map
Normal file → Executable file
0
mirzaev/beejee/system/public/js/bootstrap/bootstrap.bundle.min.js.map
Normal file → Executable file
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
0
mirzaev/beejee/tests/_output/MainCest.createTaskWithWrongEmail.fail.html
Normal file → Executable file
0
mirzaev/beejee/tests/_output/MainCest.createTaskWithWrongEmail.fail.html
Normal file → Executable file
0
mirzaev/beejee/tests/_output/MainCest.createTaskWithWrongEmail.fail.png
Normal file → Executable file
0
mirzaev/beejee/tests/_output/MainCest.createTaskWithWrongEmail.fail.png
Normal file → Executable file
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
0
mirzaev/beejee/tests/_support/_generated/AcceptanceTesterActions.php
Normal file → Executable file
0
mirzaev/beejee/tests/_support/_generated/AcceptanceTesterActions.php
Normal file → Executable file
Loading…
Reference in New Issue