Development

/branches/1.4/lib/debug/sfWebDebugPanelCache.class.php

You must first sign up to be able to contribute.

root/branches/1.4/lib/debug/sfWebDebugPanelCache.class.php

Revision 22932, 1.1 kB (checked in by Kris.Wallsmith, 5 years ago)

-

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * sfWebDebugPanelCache adds a panel to the web debug toolbar with a link to ignore the cache
13  * on the next request.
14  *
15  * @package    symfony
16  * @subpackage debug
17  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
18  * @version    SVN: $Id$
19  */
20 class sfWebDebugPanelCache extends sfWebDebugPanel
21 {
22   public function getTitle()
23   {
24     return '<img src="'.$this->webDebug->getOption('image_root_path').'/reload.png" alt="Reload" />';
25   }
26
27   public function getTitleUrl()
28   {
29     $queryString = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
30
31     if (false === strpos($queryString, '_sf_ignore_cache'))
32     {
33       return sprintf('?%s_sf_ignore_cache=1', $queryString ? $queryString.'&' : '');
34     }
35     else
36     {
37       return '?'.$queryString;
38     }
39   }
40
41   public function getPanelTitle()
42   {
43     return 'reload and ignore cache';
44   }
45
46   public function getPanelContent()
47   {
48   }
49 }
50
Note: See TracBrowser for help on using the browser.