meow/core
最新稳定版本:v0.1.1
Composer 安装命令:
composer require meow/core
包简介
Meow core library
README 文档
README
namespace: Meow\Core
Base for web applications. This is wrapper arround meow\di and meow\router. On top of it, it contains also functionality for reading configuration from arrays
Installation
To instal this one use following command
composer require meow/core
Creating new application
Create new application by creating new instance of Meow\Core\Application
require '../config/paths.php'; $app = new \Meow\Core\Application();
By default application will look for configuration and register new routes and services from application.php file in CONFIG folder. Here is example of that config file:
return [ /** * Register your application's controller here, this are used for configuring routes */ 'Controllers' => [ \May\AttributesTest\MainController::class, \May\AttributesTest\Controllers\ExampleController::class ], /** * Application Services */ 'Services' => [ /** * Application services */ \Meow\AttributesTest\Database\DatabaseServiceProviderInterface::class => \Meow\AttributesTest\Database\DatabaseServiceProvider::class, ], //... more configuration ];
Getting result from controller
This is what you congroller returns. To get the controller from uri you can do this:
if (!isset($_SERVER['PATH_INFO'])) { $request_uri = '/'; } else { $request_uri = $_SERVER['PATH_INFO']; } $result = $app->callController($request_uri); // controllers should return string
License: MIT
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-18