Skip to content

Commit

Permalink
update version 2.2.2
Browse files Browse the repository at this point in the history
修复运行日志异常
修改debug模式部分功能
修改路由寻页机制
增加sql操作方法别名
  • Loading branch information
xcg340122 committed May 20, 2018
1 parent 3fe7ab4 commit 366b7f3
Show file tree
Hide file tree
Showing 61 changed files with 3,526 additions and 4,297 deletions.
8 changes: 8 additions & 0 deletions .idea/PHP300Framework2x.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

692 changes: 692 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion CNAME

This file was deleted.

Empty file removed Extend/Class/index.html
Empty file.
Empty file removed Extend/Package/index.html
Empty file.
46 changes: 24 additions & 22 deletions Framework/Library/Common/helper.php
Expand Up @@ -19,7 +19,9 @@ function dump($vars, $label = '', $return = false)
} else {
$content = $label . " :\n" . print_r($vars, true);
}
if ($return) { return $content; }
if ($return) {
return $content;
}
echo $content;
return null;
}
Expand All @@ -32,12 +34,12 @@ function dump($vars, $label = '', $return = false)
function Db($config = null)
{
$Db = \Framework\App::$app->get('Db')->getlink();
if(is_array($Db) && count($Db) > 0){
if(is_null($config)){
if (is_array($Db) && count($Db) > 0) {
if (is_null($config)) {
$link = current($Db);
return $link['obj']->setlink($link['link']);
}
if(!empty($Db[$config])){
if (!empty($Db[$config])) {
return $Db[$config]['obj']->setlink($Db[$config]['link']);
}
}
Expand All @@ -50,7 +52,7 @@ function Db($config = null)
*/
function Config($configName)
{
if(empty($configName)) return false;
if (empty($configName)) return false;
return \Framework\App::$app->get('Config')->get($configName);
}

Expand All @@ -70,18 +72,18 @@ function Cache()
* @param string $dir 其他模板文件
* @return mixed
*/
function View($fileName='',$dir='')
function View($fileName = '', $dir = '')
{
$Object = \Framework\App::$app->get('View')->init();
if(empty($fileName) && empty($dir)) return $Object;
if(empty($dir) && !empty($fileName)){
if (empty($fileName) && empty($dir)) return $Object;
if (empty($dir) && !empty($fileName)) {
$ViewPath = \Framework\Library\Process\Running::$framworkPath . 'Project/View';
$fileName = $ViewPath.'/'.$fileName . '.html';
}else{
$fileName = $ViewPath . '/' . $fileName . '.html';
} else {
$fileName = $dir;
}
if(!file_exists($fileName)){
$fileName = str_replace('\\','/',$fileName);
if (!file_exists($fileName)) {
$fileName = str_replace('\\', '/', $fileName);
$error = [
'file' => __FILE__,
'message' => "[$fileName] 请检查您的模板是否存在!",
Expand All @@ -97,19 +99,19 @@ function View($fileName='',$dir='')
* @param string $value GET的键名称
* @return string 为空时返回
*/
function get($value,$null='')
function get($value, $null = '')
{
return \Framework\Library\Process\Auxiliary::Receive('get.'.$value,$null);
return \Framework\Library\Process\Auxiliary::Receive('get.' . $value, $null);
}

/**
* 获取POST值
* @param string $value POST的键名称
* @return string 为空时返回
*/
function post($value,$null='')
function post($value, $null = '')
{
return \Framework\Library\Process\Auxiliary::Receive('post.'.$value,$null);
return \Framework\Library\Process\Auxiliary::Receive('post.' . $value, $null);
}

/**
Expand All @@ -118,20 +120,20 @@ function post($value,$null='')
* @param int $type 是否为包(0=扩展文件,1=扩展包)
* @return bool
*/
function extend($name,$type=0)
function extend($name, $type = 0)
{
$Extend = \Framework\App::$app->get('Extend');
if(!empty($name) && is_array($name)){
foreach($name as $value){
if($type==1){
if (!empty($name) && is_array($name)) {
foreach ($name as $value) {
if ($type == 1) {
$Extend->addPackage($value);
}else{
} else {
$Extend->addClass($value);
}
}
return true;
}
if($type==1){
if ($type == 1) {
return $Extend->addPackage($name);
}
return $Extend->addClass($name);
Expand Down
17 changes: 9 additions & 8 deletions Framework/Library/Interfaces/CacheInterface.php
Expand Up @@ -7,7 +7,8 @@
* Interface CacheInterface
* @package Framework\Library\Interfaces
*/
interface CacheInterface{
interface CacheInterface
{

/**
* 连接缓存服务器
Expand All @@ -16,7 +17,7 @@ interface CacheInterface{
* @param array $auth
* @return mixed
*/
public function connect($ip,$port,$auth=[]);
public function connect($ip, $port, $auth = []);

/**
* 获取一个缓存标识
Expand All @@ -33,15 +34,15 @@ public function get($key);
* @param int $expire
* @return mixed
*/
public function set($key,$value,$iszip=false,$expire = 3600);
public function set($key, $value, $iszip = false, $expire = 3600);

/**
* 删除一个标识
* @param $key
* @param int $timeout
* @return mixed
*/
public function delete($key,$timeout = 0);
public function delete($key, $timeout = 0);

/**
* 替换标识
Expand All @@ -51,8 +52,8 @@ public function delete($key,$timeout = 0);
* @param int $expire
* @return mixed
*/
public function replace($key,$value,$iszip=false,$expire = 3600);
public function replace($key, $value, $iszip = false, $expire = 3600);

/**
* 检查值是否存在
* @param $key
Expand All @@ -72,15 +73,15 @@ public function flush();
* @param int $number
* @return mixed
*/
public function decrement($key,$number=1);
public function decrement($key, $number = 1);

/**
* 增加标识的值
* @param $key
* @param int $number
* @return mixed
*/
public function increment($key,$number=1);
public function increment($key, $number = 1);

/**
* 获得版本号
Expand Down
5 changes: 3 additions & 2 deletions Framework/Library/Interfaces/ConfigInterface.php
Expand Up @@ -7,7 +7,8 @@
* Interface ConfigInterface
* @package Framework\Library\Interfaces
*/
interface ConfigInterface{
interface ConfigInterface
{

/**
* 读取配置
Expand All @@ -22,5 +23,5 @@ public function get($keys);
* @param $val
* @return mixed
*/
public function set($key,$val);
public function set($key, $val);
}
7 changes: 4 additions & 3 deletions Framework/Library/Interfaces/DbInterface.php
Expand Up @@ -7,7 +7,8 @@
* Interface DbInterface
* @package Framework\Library\Interfaces
*/
interface DbInterface{
interface DbInterface
{

/**
* 获取错误信息
Expand All @@ -28,7 +29,7 @@ public function connect($config = []);
* @param $method
* @return $select
*/
public function query($queryString,$select);
public function query($queryString, $select);

/**
* 设置表
Expand Down Expand Up @@ -59,7 +60,7 @@ public function insert($dataArray = []);
* @param array $unique
* @return mixed
*/
public function update($dataArray = [], $where);
public function update($dataArray = [], $where);

/**
* 删除数据
Expand Down
2 changes: 1 addition & 1 deletion Framework/Library/Interfaces/LogInterface.php
Expand Up @@ -16,5 +16,5 @@ interface LogInterface
* @param $Log
* @return mixed
*/
public function Record($LogPath,$fileName,$Log);
public function Record($LogPath, $fileName, $Log);
}

0 comments on commit 366b7f3

Please sign in to comment.