Karel Wintersky 的应用微框架

2.12.0 2024-07-07 12:06 UTC

README

项目类集合

子包

如何使用

应用 - 注册

$app = App::factory();

$app->set('PDO', new PDO(/* params */));
$app->set(PHPAuth::class, new PHPAuth($pdo, (new PHPAuthConfig())->loadENV('_env')->getConfig() ));
$app->set(Smarty::class, new Smarty());

$app->addService('pdo.main', new PDO());

稍后

$app = App::factory(); // or ::handle()

$dbc = $app->get('PDO');

// or

$dbc = (App::access())->get('PDO');

// or

$dbc = (App::factory())->getService('pdo.main'); 

CLIConsole

  • 待办事项

数据库

  • 待办事项

数据库池

  • 待办事项

钩子

  • 待办事项

Utils\Timer