Forráskód Böngészése

[FrameworkBundle] renamed getProfiler to getProfile (as the method now returns a Profile instance)

Fabien Potencier 14 éve
szülő
commit
3d532f806a
2 módosított fájl, 7 hozzáadás és 3 törlés
  1. 3 0
      UPDATE.md
  2. 4 3
      src/Symfony/Bundle/FrameworkBundle/Client.php

+ 3 - 0
UPDATE.md

@@ -9,6 +9,9 @@ timeline closely anyway.
 beta3 to beta4
 --------------
 
+* `Client::getProfiler` has been removed in favor of `Client::getProfile`,
+  which returns an instance of `Profile`.
+
 * Some `UniversalClassLoader` methods have been renamed:
 
     * `registerPrefixFallback` to `registerPrefixFallbacks`

+ 4 - 3
src/Symfony/Bundle/FrameworkBundle/Client.php

@@ -15,6 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\HttpKernel\Client as BaseClient;
 use Symfony\Component\HttpKernel\Profiler\Profiler as HttpProfiler;
+use Symfony\Component\HttpKernel\Profiler\Profile as HttpProfile;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
 
@@ -48,11 +49,11 @@ class Client extends BaseClient
     }
 
     /**
-     * Gets a profiler for the current Response.
+     * Gets the profile associated with the current Response.
      *
-     * @return HttpProfiler A Profiler instance
+     * @return HttpProfile A Profile instance
      */
-    public function getProfiler()
+    public function getProfile()
     {
         if (!$this->kernel->getContainer()->has('profiler')) {
             return false;