8000 Merge pull request #2 from WouterJ/kar-interface · wouterj/symfony@cba4124 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit cba4124

Browse files
committed
Merge pull request #2 from WouterJ/kar-interface
Created ArgumentResolverInterface
2 parents 7baeaa2 + c7fe59f commit cba4124

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\HttpKernel\Controller;
13+
14+
/**
15+
* An ArgumentResolverInterface implementation resolves the arguments of
16+
* controllers.
17+
*
18+
* @author Wouter J <wouter@wouterj.nl>
19+
*/
20+
interface ArgumentResolverInterface
21+
{
22+
/**
23+
* Checks if the current parameter can be resolved by this argument
24+
* resolver.
25+
*
26+
* @param \ReflectionParameter $parameter
27+
*
28+
* @return Boolean
29+
*/
30+
public function supports(\ReflectionParameter $parameter);
31+
32+
/**
33+
* Resolves the current parameter into an argument.
34+
*
35+
* @param \ReflectionParameter $parameter
36+
*
37+
* @return mixed The resolved argument
38+
*/
39+
public function resolve(\ReflectionParameter $parameter);
40+
}

0 commit comments

Comments
 (0)
0