juandon / core
dev-master
2017-07-16 01:52 UTC
Requires
- php: >=5.3.1
- juandon/utilities: dev-develop
- phpunit/phpunit: 5.7.20
This package is auto-updated.
Last update: 2024-09-23 08:13:38 UTC
README
包含注册、事件、日志功能。
安装
将以下代码添加到您的 "composer.json" 文件中
"repositories": [
{
"type": "vcs",
"url": "https://bitbucket.org/juandon/core"
}
],
"require": {
"juandon/core": "dev-develop"
}
然后运行 composer update
或运行 composer require juandon/core
。
使用方法
将以下代码添加到您的引导文件中
use \juandon\Core\Bootstrap;
Bootstrap::initByPath("./config.ini.php");
"config.ini.php" 文件
;<?php die; __halt_compiler();
[core]
; By default: Off
event[debug] = On
; By default: "StdOut"
;log[method] = "StdOut"
; By default: E_ERROR | E_WARNING
log[level] = E_ERROR | E_WARNING | E_NOTICE
;log.source[] = "*" ; means all log sources
log.source[] = "Foo::someMethod()"
@todo
单元测试。