Skip to content

Commit 51ccdfa

Browse files
committed
fist commit
0 parents  commit 51ccdfa

File tree

10 files changed

+144
-0
lines changed

10 files changed

+144
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.idea
2+
.DS_Store

LICENSE

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

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ray.WebParamModule
2+
3+
This is web context parameter annotations package for [BEAR.Resource](https://github.com/bearsunday/BEAR.Resource).
4+

composer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "ray/web-param-module",
3+
"description":"Web context annotations",
4+
"keywords":[
5+
"annotation"
6+
],
7+
"license": "MIT",
8+
"autoload":{
9+
"psr-4":{
10+
"Ray\\WebContextParam\\": "src/"
11+
}
12+
}
13+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* This file is part of the BEAR.Resource package.
4+
*
5+
* @license http://opensource.org/licenses/MIT MIT
6+
*/
7+
namespace Ray\WebContextParam\Annotation;
8+
9+
abstract class AbstractWebContextParam
10+
{
11+
/**
12+
* Key of query parameter
13+
*
14+
* @var string
15+
*/
16+
public $key;
17+
18+
/**
19+
* Parameter(Variable) name
20+
*
21+
* @var string
22+
*/
23+
public $param;
24+
}

src/Annotation/CookieParam.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* This file is part of the Ray.WebContextParam.
4+
*
5+
* @license http://opensource.org/licenses/bsd-license.php MIT
6+
*/
7+
namespace Ray\WebContextParam\Annotation;
8+
9+
/**
10+
* @Annotation
11+
* @Target("METHOD")
12+
*/
13+
final class CookieParam extends AbstractWebContextParam
14+
{
15+
const GLOBAL_KEY = '_COOKIE';
16+
}

src/Annotation/EnvParam.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* This file is part of the Ray.WebContextParam.
4+
*
5+
* @license http://opensource.org/licenses/bsd-license.php MIT
6+
*/
7+
namespace Ray\WebContextParam\Annotation;
8+
9+
/**
10+
* @Annotation
11+
* @Target("METHOD")
12+
*/
13+
final class EnvParam extends AbstractWebContextParam
14+
{
15+
const GLOBAL_KEY = '_ENV';
16+
}

src/Annotation/FormParam.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* This file is part of the Ray.WebContextParam.
4+
*
5+
* @license http://opensource.org/licenses/bsd-license.php MIT
6+
*/
7+
namespace Ray\WebContextParam\Annotation;
8+
9+
/**
10+
* @Annotation
11+
* @Target("METHOD")
12+
*/
13+
final class FormParam extends AbstractWebContextParam
14+
{
15+
const GLOBAL_KEY = '_POST';
16+
}

src/Annotation/QueryParam.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* This file is part of the Ray.WebContextParam.
4+
*
5+
* @license http://opensource.org/licenses/bsd-license.php MIT
6+
*/
7+
namespace Ray\WebContextParam\Annotation;
8+
9+
/**
10+
* @Annotation
11+
* @Target("METHOD")
12+
*/
13+
final class QueryParam extends AbstractWebContextParam
14+
{
15+
const GLOBAL_KEY = '_GET';
16+
}

src/Annotation/ServerParam.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* This file is part of the Ray.WebContextParam.
4+
*
5+
* @license http://opensource.org/licenses/bsd-license.php MIT
6+
*/
7+
namespace Ray\WebContextParam\Annotation;
8+
9+
/**
10+
* @Annotation
11+
* @Target("METHOD")
12+
*/
13+
final class ServerParam extends AbstractWebContextParam
14+
{
15+
const GLOBAL_KEY = '_SERVER';
16+
}

0 commit comments

Comments
 (0)