Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
pfinal-nc committed Feb 12, 2019
1 parent 1b44fb5 commit 779b1a1
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.idea
.DS_Store
/vendor
composer.lock
/attachment
/tests
39 changes: 39 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "nancheng/pfinal-config",
"authors": [
{
"name": "南丞",
"email": "[email protected]",
"homepage": "http://friday-go.cc/"
}
],
"homepage": "https://github.com/Neroxiezi/pfinal-config",
"license": "MIT",
"keywords": [
"pfinal",
"南丞",
"Q哥",
"php-config",
"config",
"pfinal-config"
],
"require": {
"php": ">=5.4.0"
},
"autoload": {
"psr-4": {
"pf\\config\\": "src/"
},
"files": [
"src/helper.php"
]
},
"autoload-dev": {
"psr-4": {
"tests\\": "tests"
}
},
"require-dev": {
"phpunit/phpunit": "6.2"
}
}
24 changes: 24 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Unit Tests">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
</whitelist>
</filter>
<php>
<env name="RUN_MODE" value="TEST"/>
</php>
</phpunit>
57 changes: 57 additions & 0 deletions src/Config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php
/**
* Created by PhpStorm.
* User: nancheng
* Date: 2019/2/12
* Time: 12:59
*
*
* _ooOoo_
* o8888888o
* 88" . "88
* (| ^_^ |)
* O\ = /O
* ____/`---'\____
* .' \\| |// `.
* / \\||| : |||// \
* / _||||| -:- |||||- \
* | | \\\ - /// | |
* | \_| ''\---/'' | |
* \ .-\__ `-` ___/-. /
* ___`. .' /--.--\ `. . ___
* ."" '< `.___\_<|>_/___.' >'"".
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
* \ \ `-. \_ __\ /__ _/ .-` / /
* ========`-.____`-.___\_____/___.-`____.-'========
* `=---='
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* 佛祖保佑 永无BUG 永不修改
*
*/

namespace pf\config;

use pf\config\build\Base;

class Config
{
protected static $link = null;

public function __call($method, $params)
{
return call_user_func_array([self::single(), $method], $params);
}

public static function single()
{
if (is_null(self::$link)) {
self::$link = new Base();
}
return self::$link;
}

public static function __callStatic($name, $arguments)
{
return call_user_func_array([self::single(), $name], $arguments);
}
}
37 changes: 37 additions & 0 deletions src/build/Base.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* Created by PhpStorm.
* User: 运营部
* Date: 2019/2/12
* Time: 13:01
*
*
* _ooOoo_
* o8888888o
* 88" . "88
* (| ^_^ |)
* O\ = /O
* ____/`---'\____
* .' \\| |// `.
* / \\||| : |||// \
* / _||||| -:- |||||- \
* | | \\\ - /// | |
* | \_| ''\---/'' | |
* \ .-\__ `-` ___/-. /
* ___`. .' /--.--\ `. . ___
* ."" '< `.___\_<|>_/___.' >'"".
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
* \ \ `-. \_ __\ /__ _/ .-` / /
* ========`-.____`-.___\_____/___.-`____.-'========
* `=---='
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* 佛祖保佑 永无BUG 永不修改
*
*/

namespace pf\config\build;

class Base
{

}
Empty file added src/helper.php
Empty file.

0 comments on commit 779b1a1

Please sign in to comment.