Skip to content

Commit

Permalink
[HttpKernel] tagged public @api
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jul 20, 2011
1 parent 7dcbcbe commit 7720cb9
Show file tree
Hide file tree
Showing 20 changed files with 234 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Symfony/Component/HttpKernel/Bundle/Bundle.php
Expand Up @@ -22,6 +22,8 @@
* for DependencyInjection extensions and Console commands.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
abstract class Bundle extends ContainerAware implements BundleInterface
{
Expand Down Expand Up @@ -61,6 +63,8 @@ public function build(ContainerBuilder $container)
* Returns the bundle's container extension.
*
* @return ExtensionInterface|null The container extension
*
* @api
*/
public function getContainerExtension()
{
Expand Down Expand Up @@ -97,6 +101,8 @@ public function getContainerExtension()
* Gets the Bundle namespace.
*
* @return string The Bundle namespace
*
* @api
*/
public function getNamespace()
{
Expand All @@ -111,6 +117,8 @@ public function getNamespace()
* Gets the Bundle directory path.
*
* @return string The Bundle absolute path
*
* @api
*/
public function getPath()
{
Expand All @@ -125,6 +133,8 @@ public function getPath()
* Returns the bundle parent name.
*
* @return string The Bundle parent name it overrides or null if no parent
*
* @api
*/
public function getParent()
{
Expand All @@ -135,6 +145,8 @@ public function getParent()
* Returns the bundle name (the class short name).
*
* @return string The Bundle name
*
* @api
*/
final public function getName()
{
Expand Down
18 changes: 18 additions & 0 deletions src/Symfony/Component/HttpKernel/Bundle/BundleInterface.php
Expand Up @@ -17,16 +17,22 @@
* BundleInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface BundleInterface
{
/**
* Boots the Bundle.
*
* @api
*/
function boot();

/**
* Shutdowns the Bundle.
*
* @api
*/
function shutdown();

Expand All @@ -36,34 +42,44 @@ function shutdown();
* It is only ever called once when the cache is empty.
*
* @param ContainerBuilder $container A ContainerBuilder instance
*
* @api
*/
function build(ContainerBuilder $container);

/**
* Returns the container extension that should be implicitly loaded.
*
* @return ExtensionInterface|null The default extension or null if there is none
*
* @api
*/
function getContainerExtension();

/**
* Returns the bundle parent name.
*
* @return string The Bundle parent name it overrides or null if no parent
*
* @api
*/
function getParent();

/**
* Returns the bundle name (the class short name).
*
* @return string The Bundle name
*
* @api
*/
function getName();

/**
* Gets the Bundle namespace.
*
* @return string The Bundle namespace
*
* @api
*/
function getNamespace();

Expand All @@ -73,6 +89,8 @@ function getNamespace();
* The path should always be returned as a Unix path (with /).
*
* @return string The Bundle absolute path
*
* @api
*/
function getPath();
}
2 changes: 2 additions & 0 deletions src/Symfony/Component/HttpKernel/Client.php
Expand Up @@ -24,6 +24,8 @@
* Client simulates a browser and makes requests to a Kernel object.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class Client extends BaseClient
{
Expand Down
Expand Up @@ -22,6 +22,8 @@
* the controller method arguments.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class ControllerResolver implements ControllerResolverInterface
{
Expand Down Expand Up @@ -49,6 +51,8 @@ public function __construct(LoggerInterface $logger = null)
* or false if this resolver is not able to determine the controller
*
* @throws \InvalidArgumentException|\LogicException If the controller can't be found
*
* @api
*/
public function getController(Request $request)
{
Expand Down Expand Up @@ -80,6 +84,8 @@ public function getController(Request $request)
* @param mixed $controller A PHP callable
*
* @throws \RuntimeException When value for argument given is not provided
*
* @api
*/
public function getArguments(Request $request, $controller)
{
Expand Down
Expand Up @@ -22,6 +22,8 @@
* A Controller can be any valid PHP callable.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface ControllerResolverInterface
{
Expand All @@ -40,6 +42,8 @@ interface ControllerResolverInterface
* or false if this resolver is not able to determine the controller
*
* @throws \InvalidArgumentException|\LogicException If the controller can't be found
*
* @api
*/
function getController(Request $request);

Expand All @@ -52,6 +56,8 @@ function getController(Request $request);
* @return array An array of arguments to pass to the controller
*
* @throws \RuntimeException When value for argument given is not provided
*
* @api
*/
function getArguments(Request $request, $controller);
}
Expand Up @@ -19,6 +19,8 @@
* DataCollectorInterface.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
interface DataCollectorInterface
{
Expand All @@ -28,13 +30,17 @@ interface DataCollectorInterface
* @param Request $request A Request instance
* @param Response $response A Response instance
* @param \Exception $exception An Exception instance
*
* @api
*/
function collect(Request $request, Response $response, \Exception $exception = null);

/**
* Returns the name of the collector.
*
* @return string The collector name
*
* @api
*/
function getName();
}
Expand Up @@ -24,6 +24,8 @@
* Controllers should be callables.
*
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
*
* @api
*/
class FilterControllerEvent extends KernelEvent
{
Expand All @@ -44,6 +46,8 @@ public function __construct(HttpKernelInterface $kernel, $controller, Request $r
* Returns the current controller
*
* @return callable
*
* @api
*/
public function getController()
{
Expand All @@ -54,6 +58,8 @@ public function getController()
* Sets a new controller
*
* @param callable $controller
*
* @api
*/
public function setController($controller)
{
Expand Down
Expand Up @@ -23,6 +23,8 @@
* browser.
*
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
*
* @api
*/
class FilterResponseEvent extends KernelEvent
{
Expand All @@ -43,6 +45,8 @@ public function __construct(HttpKernelInterface $kernel, Request $request, $requ
* Returns the current response object
*
* @return Symfony\Component\HttpFoundation\Response
*
* @api
*/
public function getResponse()
{
Expand All @@ -53,6 +57,8 @@ public function getResponse()
* Sets a new response object
*
* @param Symfony\Component\HttpFoundation\Response $response
*
* @api
*/
public function setResponse(Response $response)
{
Expand Down
8 changes: 8 additions & 0 deletions src/Symfony/Component/HttpKernel/Event/GetResponseEvent.php
Expand Up @@ -23,6 +23,8 @@
* response is set.
*
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
*
* @api
*/
class GetResponseEvent extends KernelEvent
{
Expand All @@ -36,6 +38,8 @@ class GetResponseEvent extends KernelEvent
* Returns the response object
*
* @return Symfony\Component\HttpFoundation\Response
*
* @api
*/
public function getResponse()
{
Expand All @@ -46,6 +50,8 @@ public function getResponse()
* Sets a response and stops event propagation
*
* @param Symfony\Component\HttpFoundation\Response $response
*
* @api
*/
public function setResponse(Response $response)
{
Expand All @@ -58,6 +64,8 @@ public function setResponse(Response $response)
* Returns whether a response was set
*
* @return Boolean Whether a response was set
*
* @api
*/
public function hasResponse()
{
Expand Down
Expand Up @@ -22,6 +22,8 @@
* response is set.
*
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
*
* @api
*/
class GetResponseForControllerResultEvent extends GetResponseEvent
{
Expand All @@ -42,6 +44,8 @@ public function __construct(HttpKernelInterface $kernel, Request $request, $requ
* Returns the return value of the controller
*
* @return mixed The controller return value
*
* @api
*/
public function getControllerResult()
{
Expand Down
Expand Up @@ -26,6 +26,8 @@
* event.
*
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
*
* @api
*/
class GetResponseForExceptionEvent extends GetResponseEvent
{
Expand All @@ -46,6 +48,8 @@ public function __construct(HttpKernelInterface $kernel, Request $request, $requ
* Returns the thrown exception
*
* @return \Exception The thrown exception
*
* @api
*/
public function getException()
{
Expand All @@ -58,6 +62,8 @@ public function getException()
* This exception will be thrown if no response is set in the event.
*
* @param \Exception $exception The thrown exception
*
* @api
*/
public function setException(\Exception $exception)
{
Expand Down
8 changes: 8 additions & 0 deletions src/Symfony/Component/HttpKernel/Event/KernelEvent.php
Expand Up @@ -19,6 +19,8 @@
* Base class for events thrown in the HttpKernel component
*
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
*
* @api
*/
class KernelEvent extends Event
{
Expand Down Expand Up @@ -52,6 +54,8 @@ public function __construct(HttpKernelInterface $kernel, Request $request, $requ
* Returns the kernel in which this event was thrown
*
* @return Symfony\Component\HttpKernel\HttpKernelInterface
*
* @api
*/
public function getKernel()
{
Expand All @@ -62,6 +66,8 @@ public function getKernel()
* Returns the request the kernel is currently processing
*
* @return Symfony\Component\HttpFoundation\Request
*
* @api
*/
public function getRequest()
{
Expand All @@ -73,6 +79,8 @@ public function getRequest()
*
* @return integer One of HttpKernelInterface::MASTER_REQUEST and
* HttpKernelInterface::SUB_REQUEST
*
* @api
*/
public function getRequestType()
{
Expand Down

0 comments on commit 7720cb9

Please sign in to comment.