Development

/branches/1.2/lib/debug/sfWebDebugPanelMemory.class.php

You must first sign up to be able to contribute.

root/branches/1.2/lib/debug/sfWebDebugPanelMemory.class.php

Revision 12982, 0.9 kB (checked in by hartym, 5 years ago)

[1.2] added alt attributes to web debug toolbar icons to be xhtml valid

  • 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  * sfWebDebugPanelMemory adds a panel to the web debug toolbar with the memory used by the script.
13  *
14  * @package    symfony
15  * @subpackage debug
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 class sfWebDebugPanelMemory extends sfWebDebugPanel
20 {
21   public function getTitle()
22   {
23     if (function_exists('memory_get_usage'))
24     {
25       $totalMemory = sprintf('%.1f', (memory_get_usage() / 1024));
26
27       return '<img src="'.$this->webDebug->getOption('image_root_path').'/memory.png" alt="Memory" /> '.$totalMemory.' KB';
28     }
29   }
30
31   public function getPanelTitle()
32   {
33   }
34
35   public function getPanelContent()
36   {
37   }
38 }
39
Note: See TracBrowser for help on using the browser.