Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Sep 21, 2018
2 parents b289b33 + 7dc76e2 commit 6f498bc
Show file tree
Hide file tree
Showing 459 changed files with 26,151 additions and 24,854 deletions.
14 changes: 7 additions & 7 deletions bin/imi.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
$namespace = Args::get('appNamespace');
if(null === $namespace)
{
$config = include File::path(dirname($_SERVER['SCRIPT_NAME'], 2), 'config/config.php');
if(!isset($config['namespace']))
{
echo 'has no namespace, please add arg: -appNamespace "Your App Namespace"', PHP_EOL;
exit;
}
$namespace = $config['namespace'];
$config = include File::path(dirname($_SERVER['SCRIPT_NAME'], 2), 'config/config.php');
if(!isset($config['namespace']))
{
echo 'has no namespace, please add arg: -appNamespace "Your App Namespace"', PHP_EOL;
exit;
}
$namespace = $config['namespace'];
}

App::run($namespace);
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "yurunsoft/imi",
"type": "library",
"name": "yurunsoft/imi",
"type": "library",
"license": "Apache-2.0",
"description": "基于 Swoole 开发的协程 PHP 开发框架,常驻内存、协程异步,致力于丰富框架文档,上手容易,让开发者跟使用传统 MVC 框架一样顺手",
"description": "基于 Swoole 开发的协程 PHP 开发框架,常驻内存、协程异步,致力于丰富框架文档,上手容易,让开发者跟使用传统 MVC 框架一样顺手",
"require": {
"php": ">=7.1.0",
"doctrine/annotations": "1.4",
Expand All @@ -17,7 +17,7 @@
},
"autoload": {
"psr-4" : {
"Imi\\" : "src/"
"Imi\\" : "src/"
}
}
}
40 changes: 20 additions & 20 deletions config/config.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<?php
return [
'beanScan' => [
'Imi\Bean',
'Imi\Aop',
'Imi\Annotation',
'Imi\Cache',
'Imi\Server',
'Imi\Log',
'Imi\Pool',
'Imi\Db',
'Imi\Redis',
'Imi\Listener',
'Imi\Model',
'Imi\Task',
'Imi\Tool',
'Imi\Process',
'Imi\HotUpdate',
],
'atomics' => [
'session'
]
'beanScan' => [
'Imi\Bean',
'Imi\Aop',
'Imi\Annotation',
'Imi\Cache',
'Imi\Server',
'Imi\Log',
'Imi\Pool',
'Imi\Db',
'Imi\Redis',
'Imi\Listener',
'Imi\Model',
'Imi\Task',
'Imi\Tool',
'Imi\Process',
'Imi\HotUpdate',
],
'atomics' => [
'session'
]
];
42 changes: 21 additions & 21 deletions src/Aop/AfterReturningJoinPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@

class AfterReturningJoinPoint extends JoinPoint
{
/**
* 返回值
* @var mixed
*/
private $returnValue;
/**
* 返回值
* @var mixed
*/
private $returnValue;

/**
* 设置返回值
* @return mixed
*/
public function setReturnValue($value)
{
$this->returnValue = $value;
}
/**
* 设置返回值
* @return mixed
*/
public function setReturnValue($value)
{
$this->returnValue = $value;
}

/**
* 获取返回值
* @return mixed
*/
public function getReturnValue()
{
return $this->returnValue;
}
/**
* 获取返回值
* @return mixed
*/
public function getReturnValue()
{
return $this->returnValue;
}
}
80 changes: 40 additions & 40 deletions src/Aop/AfterThrowingJoinPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,49 @@

class AfterThrowingJoinPoint extends JoinPoint
{
/**
* 异常
* @var \Throwable
*/
private $throwable;
/**
* 异常
* @var \Throwable
*/
private $throwable;

/**
* 是否取消抛出异常
* @var boolean
*/
private $isCancelThrow = false;
/**
* 是否取消抛出异常
* @var boolean
*/
private $isCancelThrow = false;

public function __construct($type, $method, $args, $target, $_this, \Throwable $throwable)
{
parent::__construct(...func_get_args());
$this->throwable = $throwable;
}
public function __construct($type, $method, $args, $target, $_this, \Throwable $throwable)
{
parent::__construct(...func_get_args());
$this->throwable = $throwable;
}

/**
* 获取异常
* @return \Throwable
*/
public function getThrowable()
{
return $this->throwable;
}
/**
* 获取异常
* @return \Throwable
*/
public function getThrowable()
{
return $this->throwable;
}

/**
* 取消抛出异常
* @param boolean $isCancelThrow 是否取消,默认为true
* @return boolean
*/
public function cancelThrow($isCancelThrow = true)
{
$this->isCancelThrow = $isCancelThrow;
}
/**
* 取消抛出异常
* @param boolean $isCancelThrow 是否取消,默认为true
* @return boolean
*/
public function cancelThrow($isCancelThrow = true)
{
$this->isCancelThrow = $isCancelThrow;
}

/**
* 是否取消抛出异常
* @return boolean
*/
public function isCancelThrow()
{
return $this->isCancelThrow;
}
/**
* 是否取消抛出异常
* @return boolean
*/
public function isCancelThrow()
{
return $this->isCancelThrow;
}
}
2 changes: 1 addition & 1 deletion src/Aop/Annotation/After.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
*/
class After extends Base
{
}
2 changes: 1 addition & 1 deletion src/Aop/Annotation/AfterReturning.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
*/
class AfterReturning extends Base
{
}
20 changes: 10 additions & 10 deletions src/Aop/Annotation/AfterThrowing.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
*/
class AfterThrowing extends Base
{
/**
* 允许捕获的异常类列表
* @var array
*/
public $allow = [];
/**
* 允许捕获的异常类列表
* @var array
*/
public $allow = [];

/**
* 不允许捕获的异常类列表
* @var array
*/
public $deny = [];
/**
* 不允许捕获的异常类列表
* @var array
*/
public $deny = [];
}
2 changes: 1 addition & 1 deletion src/Aop/Annotation/Around.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
*/
class Around extends Base
{
}
10 changes: 5 additions & 5 deletions src/Aop/Annotation/Aspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
*/
class Aspect extends Base
{
/**
* 优先级,越大越先执行
* @var int
*/
public $priority = 0;
/**
* 优先级,越大越先执行
* @var int
*/
public $priority = 0;
}
2 changes: 1 addition & 1 deletion src/Aop/Annotation/Before.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
*/
class Before extends Base
{
}
28 changes: 14 additions & 14 deletions src/Aop/Annotation/Inject.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
*/
class Inject extends Base
{
/**
* 只传一个参数时的参数名
* @var string
*/
protected $defaultFieldName = 'name';
/**
* 只传一个参数时的参数名
* @var string
*/
protected $defaultFieldName = 'name';

/**
* Bean名称或类名
*/
public $name;
/**
* Bean名称或类名
*/
public $name;

/**
* Bean实例化参数
* @var array
*/
public $args = [];
/**
* Bean实例化参数
* @var array
*/
public $args = [];
}
20 changes: 10 additions & 10 deletions src/Aop/Annotation/PointCut.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
*/
class PointCut extends Base
{
/**
* 允许的切入点
* @var array
*/
public $allow = [];
/**
* 允许的切入点
* @var array
*/
public $allow = [];

/**
* 不允许的切入点,即使包含中有的,也可以被排除
* @var array
*/
public $deny = [];
/**
* 不允许的切入点,即使包含中有的,也可以被排除
* @var array
*/
public $deny = [];
}
2 changes: 1 addition & 1 deletion src/Aop/Annotation/RequestInject.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
*/
class RequestInject extends Inject
{
}
Loading

0 comments on commit 6f498bc

Please sign in to comment.