Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 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: sfWebDebugPanelCache.class.php 22932 2009-10-11 22:40:20Z Kris.Wallsmith $
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
}