[Routing] fix phpDoc

using inheritdoc where possible and removing api tag when parent interface has one
This commit is contained in:
Tobias Schultze 2012-05-05 01:43:00 +02:00
parent 3bb7dc0bfa
commit 680e732a9e
17 changed files with 32 additions and 118 deletions

View File

@ -53,12 +53,7 @@ class DelegatingLoader extends Loader
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean true if this class supports the given resource, false otherwise
*/ */
public function supports($resource, $type = null) public function supports($resource, $type = null)
{ {

View File

@ -32,6 +32,9 @@ abstract class GeneratorDumper implements GeneratorDumperInterface
$this->routes = $routes; $this->routes = $routes;
} }
/**
* {@inheritdoc}
*/
public function getRoutes() public function getRoutes()
{ {
return $this->routes; return $this->routes;

View File

@ -23,16 +23,12 @@ use Symfony\Component\Routing\RouteCollection;
interface GeneratorDumperInterface interface GeneratorDumperInterface
{ {
/** /**
* Dumps a set of routes to a PHP class. * Dumps a set of routes to a string representation of executable code
* * that can then be used to generate a URL of such a route.
* Available options:
*
* * class: The class name
* * base_class: The base class name
* *
* @param array $options An array of options * @param array $options An array of options
* *
* @return string A PHP class representing the generator class * @return string Executable code
*/ */
function dump(array $options = array()); function dump(array $options = array());

View File

@ -50,11 +50,7 @@ class UrlGenerator implements UrlGeneratorInterface
} }
/** /**
* Sets the request context. * {@inheritdoc}
*
* @param RequestContext $context The context
*
* @api
*/ */
public function setContext(RequestContext $context) public function setContext(RequestContext $context)
{ {
@ -62,9 +58,7 @@ class UrlGenerator implements UrlGeneratorInterface
} }
/** /**
* Gets the request context. * {@inheritdoc}
*
* @return RequestContext The context
*/ */
public function getContext() public function getContext()
{ {
@ -72,9 +66,7 @@ class UrlGenerator implements UrlGeneratorInterface
} }
/** /**
* {@inheritDoc} * {@inheritdoc}
*
* @api
*/ */
public function generate($name, $parameters = array(), $absolute = false) public function generate($name, $parameters = array(), $absolute = false)
{ {

View File

@ -160,12 +160,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
*/ */
public function supports($resource, $type = null) public function supports($resource, $type = null)
{ {
@ -173,18 +168,14 @@ abstract class AnnotationClassLoader implements LoaderInterface
} }
/** /**
* Sets the loader resolver. * {@inheritdoc}
*
* @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
*/ */
public function setResolver(LoaderResolverInterface $resolver) public function setResolver(LoaderResolverInterface $resolver)
{ {
} }
/** /**
* Gets the loader resolver. * {@inheritdoc}
*
* @return LoaderResolverInterface A LoaderResolverInterface instance
*/ */
public function getResolver() public function getResolver()
{ {

View File

@ -62,12 +62,7 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
*/ */
public function supports($resource, $type = null) public function supports($resource, $type = null)
{ {

View File

@ -68,12 +68,7 @@ class AnnotationFileLoader extends FileLoader
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
*/ */
public function supports($resource, $type = null) public function supports($resource, $type = null)
{ {

View File

@ -38,12 +38,7 @@ class ClosureLoader extends Loader
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* *
* @api * @api
*/ */

View File

@ -48,12 +48,7 @@ class PhpFileLoader extends FileLoader
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* *
* @api * @api
*/ */

View File

@ -110,12 +110,7 @@ class XmlFileLoader extends FileLoader
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* *
* @api * @api
*/ */

View File

@ -82,12 +82,7 @@ class YamlFileLoader extends FileLoader
} }
/** /**
* Returns true if this class supports the given resource. * {@inheritdoc}
*
* @param mixed $resource A resource
* @param string $type The resource type
*
* @return Boolean True if this class supports the given resource, false otherwise
* *
* @api * @api
*/ */

View File

@ -33,9 +33,7 @@ abstract class MatcherDumper implements MatcherDumperInterface
} }
/** /**
* Gets the routes to dump. * {@inheritdoc}
*
* @return RouteCollection A RouteCollection instance
*/ */
public function getRoutes() public function getRoutes()
{ {

View File

@ -19,21 +19,17 @@ namespace Symfony\Component\Routing\Matcher\Dumper;
interface MatcherDumperInterface interface MatcherDumperInterface
{ {
/** /**
* Dumps a set of routes to a PHP class. * Dumps a set of routes to a string representation of executable code
* * that can then be used to match a request against these routes.
* Available options:
*
* * class: The class name
* * base_class: The base class name
* *
* @param array $options An array of options * @param array $options An array of options
* *
* @return string A PHP class representing the matcher class * @return string Executable code
*/ */
function dump(array $options = array()); function dump(array $options = array());
/** /**
* Gets the routes to match. * Gets the routes to dump.
* *
* @return RouteCollection A RouteCollection instance * @return RouteCollection A RouteCollection instance
*/ */

View File

@ -22,9 +22,7 @@ use Symfony\Component\Routing\Route;
abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface abstract class RedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface
{ {
/** /**
* @see UrlMatcher::match() * {@inheritdoc}
*
* @api
*/ */
public function match($pathinfo) public function match($pathinfo)
{ {

View File

@ -50,11 +50,7 @@ class UrlMatcher implements UrlMatcherInterface
} }
/** /**
* Sets the request context. * {@inheritdoc}
*
* @param RequestContext $context The context
*
* @api
*/ */
public function setContext(RequestContext $context) public function setContext(RequestContext $context)
{ {
@ -62,9 +58,7 @@ class UrlMatcher implements UrlMatcherInterface
} }
/** /**
* Gets the request context. * {@inheritdoc}
*
* @return RequestContext The context
*/ */
public function getContext() public function getContext()
{ {
@ -72,16 +66,7 @@ class UrlMatcher implements UrlMatcherInterface
} }
/** /**
* Tries to match a URL with a set of routes. * {@inheritdoc}
*
* @param string $pathinfo The path info to be parsed (raw format, i.e. not urldecoded)
*
* @return array An array of parameters
*
* @throws ResourceNotFoundException If the resource could not be found
* @throws MethodNotAllowedException If the resource was found but the request method is not allowed
*
* @api
*/ */
public function match($pathinfo) public function match($pathinfo)
{ {

View File

@ -21,11 +21,7 @@ class RouteCompiler implements RouteCompilerInterface
const REGEX_DELIMITER = '#'; const REGEX_DELIMITER = '#';
/** /**
* Compiles the current route instance. * {@inheritDoc}
*
* @param Route $route A Route instance
*
* @return CompiledRoute A CompiledRoute instance
* *
* @throws \LogicException If a variable is referenced more than once * @throws \LogicException If a variable is referenced more than once
*/ */

View File

@ -128,9 +128,7 @@ class Router implements RouterInterface
} }
/** /**
* Gets the RouteCollection instance associated with this Router. * {@inheritdoc}
*
* @return RouteCollection A RouteCollection instance
*/ */
public function getRouteCollection() public function getRouteCollection()
{ {
@ -142,9 +140,7 @@ class Router implements RouterInterface
} }
/** /**
* Sets the request context. * {@inheritdoc}
*
* @param RequestContext $context The context
*/ */
public function setContext(RequestContext $context) public function setContext(RequestContext $context)
{ {
@ -155,9 +151,7 @@ class Router implements RouterInterface
} }
/** /**
* Gets the request context. * {@inheritdoc}
*
* @return RequestContext The context
*/ */
public function getContext() public function getContext()
{ {