-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Squashed 'src/framework/' changes from 0d8bb66d..7003d920
7003d920 Merge commit '30a1120da2a33a98360ee4da4e4586ad3412b5f2' e8da8609 [fixed]eval error with void method (#92) 5cf5896c [fixed] logger->messages init error (#91) 52bbec6c Merge pull request #114 from aprchen/patch-1 847f23b4 fix spanid c559c93e add coWrite(); use swoft/swoole-ide-helper (#83) 21d268b7 change fix e88a03f6 fix index err 620394d5 Merge commit '1643eb132396c22e6c9be8c90d123a31487455dd' 54f1675d Merge branch 'master' of https://github.com/swoft-cloud/swoft-component 8cf725ac refactor bean scan d6c20a92 ws-server: bug fixed for connection info lost. fix cannot connect to root path d91c68d1 add template of validator e591de64 Merge branch 'master' of github.com:aprchen/swoft-component 001b46ed 格式修改,添加返回值类型,添加is_iterable兼容 1ea88d43 Update XmlHelper.php fbfec258 Update XmlHelper.php 4fc2b08f Update XmlHelperTest.php c38e5110 Update XmlHelperTest.php 9e65bc4b 格式化 4a1ef3db 添加xml解析,完善单元测试 1996c5b4 Merge pull request #2 from inhere/master 651ef229 new: add timezone setting. fix some bug for Config 4fbf22cb fix: bug fixed for array heleper e828b7b3 up: change config() to config(key, default) 72aa48c6 add server type option a5acf660 new: add global function config(). add new option for devtool 72e97a05 fix: The server object does not need a reference git-subtree-dir: src/framework git-subtree-split: 7003d920fb31936f59f7851f0acf81544e007fae
- Loading branch information
1 parent
1643eb1
commit ab0f478
Showing
34 changed files
with
768 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,10 @@ | |
namespace Swoft\Bean\Annotation; | ||
|
||
/** | ||
* 浮点数验证 | ||
* Floats | ||
* | ||
* @Annotation | ||
* @Target("METHOD") | ||
* | ||
* @uses Floats | ||
* @version 2017年11月13日 | ||
* @author stelin <[email protected]> | ||
* @copyright Copyright 2010-2016 swoft software | ||
* @license PHP Version 7.x {@link http://www.php.net/license/3_0.txt} | ||
*/ | ||
class Floats | ||
{ | ||
|
@@ -42,6 +36,11 @@ class Floats | |
*/ | ||
private $max; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $template = ''; | ||
|
||
/** | ||
* 默认值,如果是null,强制验证参数 | ||
* | ||
|
@@ -71,6 +70,9 @@ public function __construct(array $values) | |
if (isset($values['default'])) { | ||
$this->default = $values['default']; | ||
} | ||
if (isset($values['template'])) { | ||
$this->template = $values['template']; | ||
} | ||
} | ||
|
||
/** | ||
|
@@ -112,4 +114,20 @@ public function getFrom(): string | |
{ | ||
return $this->from; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getTemplate(): string | ||
{ | ||
return $this->template; | ||
} | ||
|
||
/** | ||
* @param string $template | ||
*/ | ||
public function setTemplate(string $template) | ||
{ | ||
$this->template = $template; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.