Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit e15c585

Browse files
author
Changwan Jun
committed
Merge branch 'release/v3.0.2'
2 parents 4ce1299 + 57e6468 commit e15c585

File tree

13 files changed

+345
-276
lines changed

13 files changed

+345
-276
lines changed

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Changwan Jun
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

build/split-full.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11

22
git subsplit init [email protected]:Wandu/Framework.git
33

4-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Caster:[email protected]:Wandu/Caster.git
5-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Compiler:[email protected]:Wandu/Compiler.git
6-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Config:[email protected]:Wandu/Config.git
7-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Console:[email protected]:Wandu/Console.git
8-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Database:[email protected]:Wandu/Database.git
9-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/DateTime:[email protected]:Wandu/DateTime.git
10-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/DI:[email protected]:Wandu/DI.git
11-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Event:[email protected]:Wandu/Event.git
12-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Foundation:[email protected]:Wandu/Foundation.git
13-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Http:[email protected]:Wandu/Http.git
14-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Installation:[email protected]:Wandu/Installation.git
15-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Q:[email protected]:Wandu/Q.git
16-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Router:[email protected]:Wandu/Router.git
17-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Support:[email protected]:Wandu/Support.git
18-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/Validator:[email protected]:Wandu/Validator.git
19-
git subsplit publish --heads="develop master" --tags="v3.0.0" src/Wandu/View:[email protected]:Wandu/View.git
4+
git subsplit publish --heads="develop master" src/Wandu/Caster:[email protected]:Wandu/Caster.git
5+
git subsplit publish --heads="develop master" src/Wandu/Compiler:[email protected]:Wandu/Compiler.git
6+
git subsplit publish --heads="develop master" src/Wandu/Config:[email protected]:Wandu/Config.git
7+
git subsplit publish --heads="develop master" src/Wandu/Console:[email protected]:Wandu/Console.git
8+
git subsplit publish --heads="develop master" src/Wandu/Database:[email protected]:Wandu/Database.git
9+
git subsplit publish --heads="develop master" src/Wandu/DateTime:[email protected]:Wandu/DateTime.git
10+
git subsplit publish --heads="develop master" src/Wandu/DI:[email protected]:Wandu/DI.git
11+
git subsplit publish --heads="develop master" src/Wandu/Event:[email protected]:Wandu/Event.git
12+
git subsplit publish --heads="develop master" src/Wandu/Foundation:[email protected]:Wandu/Foundation.git
13+
git subsplit publish --heads="develop master" src/Wandu/Http:[email protected]:Wandu/Http.git
14+
git subsplit publish --heads="develop master" src/Wandu/Installation:[email protected]:Wandu/Installation.git
15+
git subsplit publish --heads="develop master" src/Wandu/Q:[email protected]:Wandu/Q.git
16+
git subsplit publish --heads="develop master" src/Wandu/Router:[email protected]:Wandu/Router.git
17+
git subsplit publish --heads="develop master" src/Wandu/Support:[email protected]:Wandu/Support.git
18+
git subsplit publish --heads="develop master" src/Wandu/Validator:[email protected]:Wandu/Validator.git
19+
git subsplit publish --heads="develop master" src/Wandu/View:[email protected]:Wandu/View.git
2020

2121
rm -rf .subsplit/

src/Wandu/Foundation/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Application extends Container
88
{
99
const NAME = "Wandu";
10-
const VERSION = "3.0.1";
10+
const VERSION = "3.0.2";
1111

1212
/** @var \Wandu\Foundation\Contracts\KernelInterface */
1313
protected $kernel;

src/Wandu/Http/Contracts/ParameterInterface.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ public function toArray();
1919

2020
/**
2121
* @param array $keyOrDefaults
22+
* @param bool $isStrict
2223
* @return array
2324
*/
24-
public function getMany(array $keyOrDefaults = []);
25+
public function getMany(array $keyOrDefaults = [], $isStrict = false);
2526

2627
/**
2728
* @param string $key
2829
* @param mixed $default
30+
* @param bool $isStrict
2931
* @return mixed
3032
*/
31-
public function get($key, $default = null);
33+
public function get($key, $default = null, $isStrict = false);
3234

3335
/**
3436
* @param string $key

src/Wandu/Http/Cookie/CookieJar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public function toArray()
3737
/**
3838
* {@inheritdoc}
3939
*/
40-
public function get($name, $default = null)
40+
public function get($name, $default = null, $isStrict = false)
4141
{
4242
if (isset($this->setCookies[$name]) && $this->setCookies[$name]->getValue()) {
4343
return $this->setCookies[$name]->getValue();
4444
}
45-
return parent::get($name, $default);
45+
return parent::get($name, $default, $isStrict);
4646
}
4747

4848
/**

src/Wandu/Http/Parameters/Parameter.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,14 @@ public function toArray()
4747
/**
4848
* {@inheritdoc}
4949
*/
50-
public function getMany(array $keyOrDefaults = [])
50+
public function getMany(array $keyOrDefaults = [], $isStrict = false)
5151
{
5252
$dataToReturn = [];
5353
foreach ($keyOrDefaults as $key => $value) {
5454
if (is_integer($key)) {
55-
if ($this->has($value)) {
56-
$dataToReturn[$value] = $this->get($value);
57-
}
55+
$dataToReturn[$value] = $this->get($value, null, $isStrict);
5856
} else {
59-
$dataToReturn[$key] = $this->get($key, $value);
57+
$dataToReturn[$key] = $this->get($key, $value, $isStrict);
6058
}
6159
}
6260
return $dataToReturn;
@@ -65,9 +63,9 @@ public function getMany(array $keyOrDefaults = [])
6563
/**
6664
* {@inheritdoc}
6765
*/
68-
public function get($key, $default = null)
66+
public function get($key, $default = null, $isStrict = false)
6967
{
70-
if (array_key_exists($key, $this->params)) {
68+
if (isset($this->params[$key]) && ($isStrict || !$isStrict && $this->params[$key])) {
7169
return $this->params[$key];
7270
}
7371
if (isset($this->fallback)) {
@@ -81,7 +79,7 @@ public function get($key, $default = null)
8179
*/
8280
public function has($key)
8381
{
84-
if (array_key_exists($key, $this->params)) {
82+
if (isset($this->params[$key])) {
8583
return true;
8684
}
8785
if (isset($this->fallback) && $this->fallback->has($key)) {

src/Wandu/Http/Session/Session.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ public function getRawParams()
5454
/**
5555
* {@inheritdoc}
5656
*/
57-
public function get($name, $default = null)
57+
public function get($name, $default = null, $isStrict = false)
5858
{
5959
$this->validNameArgument($name);
60-
if (isset($this->params['__flash__'][$name])) {
60+
if (isset($this->params['__flash__'][$name]) && ($isStrict || !$isStrict && $this->params['__flash__'][$name])) {
6161
$resultToReturn = $this->params['__flash__'][$name];
6262
unset($this->params['__flash__'][$name]);
6363
return $resultToReturn;
6464
}
65-
return parent::get($name, $default);
65+
return parent::get($name, $default, $isStrict);
6666
}
6767

6868
/**

tests/Http/Contracts/ParameterInterfaceTestTrait.php

Lines changed: 0 additions & 166 deletions
This file was deleted.

0 commit comments

Comments
 (0)