فهرست منبع

changed method signature to use the new KernelInterface

Fabien Potencier 14 سال پیش
والد
کامیت
36dcce40eb

+ 2 - 2
src/Symfony/Bundle/FrameworkBundle/Client.php

@@ -32,7 +32,7 @@ class Client extends BaseClient
     /**
      * Constructor.
      *
-     * @param HttpKernelInterface $kernel    A Kernel instance
+     * @param HttpKernelInterface $kernel    An HttpKernelInterface instance
      * @param array               $server    The server parameters (equivalent of $_SERVER)
      * @param History             $history   A History instance to store the browser history
      * @param CookieJar           $cookieJar A CookieJar instance to store the cookies
@@ -57,7 +57,7 @@ class Client extends BaseClient
     /**
      * Returns the kernel.
      *
-     * @return Kernel
+     * @return HttpKernelInterface
      */
     public function getKernel()
     {

+ 3 - 2
src/Symfony/Bundle/FrameworkBundle/Console/Application.php

@@ -15,6 +15,7 @@ use Symfony\Component\Console\Application as BaseApplication;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
+use Symfony\Component\HttpKernel\KernelInterface;
 use Symfony\Component\HttpKernel\Kernel;
 
 /**
@@ -29,7 +30,7 @@ class Application extends BaseApplication
     /**
      * Constructor.
      */
-    public function __construct(Kernel $kernel)
+    public function __construct(KernelInterface $kernel)
     {
         $this->kernel = $kernel;
 
@@ -45,7 +46,7 @@ class Application extends BaseApplication
     /**
      * Gets the Kernel associated with this Console.
      *
-     * @return Kernel A Kernel instance
+     * @return KernelInterface A KernelInterface instance
      */
     public function getKernel()
     {

+ 3 - 3
src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php

@@ -11,7 +11,7 @@
 
 namespace Symfony\Bundle\FrameworkBundle\Controller;
 
-use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\HttpKernel\KernelInterface;
 use Symfony\Component\HttpKernel\Log\LoggerInterface;
 
 /**
@@ -29,10 +29,10 @@ class ControllerNameParser
     /**
      * Constructor.
      *
-     * @param Kernel          $kernel A Kernel instance
+     * @param KernelInterface $kernel A KernelInterface instance
      * @param LoggerInterface $logger A LoggerInterface instance
      */
-    public function __construct(Kernel $kernel, LoggerInterface $logger = null)
+    public function __construct(KernelInterface $kernel, LoggerInterface $logger = null)
     {
         $this->kernel = $kernel;
         $this->logger = $logger;

+ 4 - 3
src/Symfony/Bundle/FrameworkBundle/DataCollector/ConfigDataCollector.php

@@ -11,6 +11,7 @@
 
 namespace Symfony\Bundle\FrameworkBundle\DataCollector;
 
+use Symfony\Component\HttpKernel\KernelInterface;
 use Symfony\Component\HttpKernel\Kernel;
 use Symfony\Component\HttpKernel\DataCollector\DataCollector;
 use Symfony\Component\HttpFoundation\Request;
@@ -30,10 +31,10 @@ class ConfigDataCollector extends DataCollector
     /**
      * Constructor.
      *
-     * @param Kernel          $kernel A Kernel instance
-     * @param RouterInterface $router A Router instance
+     * @param KernelInterface $kernel A KernelInterface instance
+     * @param RouterInterface $router A RouterInterface instance
      */
-    public function __construct(Kernel $kernel, RouterInterface $router = null)
+    public function __construct(KernelInterface $kernel, RouterInterface $router = null)
     {
         $this->kernel = $kernel;
         $this->router = $router;

+ 2 - 2
src/Symfony/Bundle/FrameworkBundle/DataCollector/TimerDataCollector.php

@@ -12,7 +12,7 @@
 namespace Symfony\Bundle\FrameworkBundle\DataCollector;
 
 use Symfony\Component\HttpKernel\DataCollector\DataCollector;
-use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\HttpKernel\KernelInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 
@@ -25,7 +25,7 @@ class TimerDataCollector extends DataCollector
 {
     protected $kernel;
 
-    public function __construct(Kernel $kernel)
+    public function __construct(KernelInterface $kernel)
     {
         $this->kernel = $kernel;
     }

+ 5 - 5
src/Symfony/Bundle/FrameworkBundle/Routing/FileLocator.php

@@ -12,10 +12,10 @@
 namespace Symfony\Bundle\FrameworkBundle\Routing;
 
 use Symfony\Component\Routing\Loader\FileLocator as BaseFileLocator;
-use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\HttpKernel\KernelInterface;
 
 /**
- * FileLocator uses the Kernel to locate resources in bundles.
+ * FileLocator uses the KernelInterface to locate resources in bundles.
  *
  * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  */
@@ -26,10 +26,10 @@ class FileLocator extends BaseFileLocator
     /**
      * Constructor.
      *
-     * @param Kernel       $kernel A Kernel instance
-     * @param string|array $paths  A path or an array of paths where to look for resources
+     * @param KernelInterface $kernel A KernelInterface instance
+     * @param string|array    $paths  A path or an array of paths where to look for resources
      */
-    public function __construct(Kernel $kernel, array $paths = array())
+    public function __construct(KernelInterface $kernel, array $paths = array())
     {
         $this->kernel = $kernel;
 

+ 4 - 4
src/Symfony/Bundle/FrameworkBundle/Templating/CacheWarmer/TemplatePathsCacheWarmer.php

@@ -12,7 +12,7 @@
 namespace Symfony\Bundle\FrameworkBundle\Templating\CacheWarmer;
 
 use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmer;
-use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\HttpKernel\KernelInterface;
 use Symfony\Component\Finder\Finder;
 
 /**
@@ -28,10 +28,10 @@ class TemplatePathsCacheWarmer extends CacheWarmer
     /**
      * Constructor.
      *
-     * @param Kernel $kernel  A Kernel instance
-     * @param string $rootDir The directory where global templates can be stored
+     * @param KernelInterface $kernel  A KernelInterface instance
+     * @param string          $rootDir The directory where global templates can be stored
      */
-    public function __construct(Kernel $kernel, $rootDir)
+    public function __construct(KernelInterface $kernel, $rootDir)
     {
         $this->kernel = $kernel;
         $this->rootDir = $rootDir;

+ 3 - 3
src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateLocator.php

@@ -12,7 +12,7 @@
 namespace Symfony\Bundle\FrameworkBundle\Templating\Loader;
 
 use Symfony\Component\Templating\Loader\TemplateNameParserInterface;
-use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\HttpKernel\KernelInterface;
 
 /**
  *
@@ -28,11 +28,11 @@ class TemplateLocator implements TemplateLocatorInterface
     /**
      * Constructor.
      *
-     * @param Kernel                      $kernel A Kernel instance
+     * @param KernelInterface             $kernel A KernelInterface instance
      * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance
      * @param string                      $path   A global fallback path
      */
-    public function __construct(Kernel $kernel, TemplateNameParserInterface $parser, $path)
+    public function __construct(KernelInterface $kernel, TemplateNameParserInterface $parser, $path)
     {
         $this->kernel = $kernel;
         $this->path = $path;

+ 3 - 3
src/Symfony/Bundle/FrameworkBundle/Templating/Loader/TemplateNameParser.php

@@ -12,7 +12,7 @@
 namespace Symfony\Bundle\FrameworkBundle\Templating\Loader;
 
 use Symfony\Component\Templating\Loader\TemplateNameParser as BaseTemplateNameParser;
-use Symfony\Component\HttpKernel\Kernel;
+use Symfony\Component\HttpKernel\KernelInterface;
 
 /**
  * TemplateNameParser parsers template name from the short notation
@@ -28,9 +28,9 @@ class TemplateNameParser extends BaseTemplateNameParser
     /**
      * Constructor.
      *
-     * @param Kernel $kernel A Kernel instance
+     * @param KernelInterface $kernel A KernelInterface instance
      */
-    public function __construct(Kernel $kernel)
+    public function __construct(KernelInterface $kernel)
     {
         $this->kernel = $kernel;
     }