Source for file strip.php

Documentation is available at strip.php

  1. <?php
  2.  
  3. /**
  4.  * Strips the spaces at the beginning and end of each line and also the line breaks
  5.  *
  6.  * This software is provided 'as-is', without any express or implied warranty.
  7.  * In no event will the authors be held liable for any damages arising from the use of this software.
  8.  *
  9.  * This file is released under the LGPL
  10.  * "GNU Lesser General Public License"
  11.  * More information can be found here:
  12.  * {@link http://www.gnu.org/copyleft/lesser.html}
  13.  *
  14.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  15.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  16.  * @license    http://www.gnu.org/copyleft/lesser.html  GNU Lesser General Public License
  17.  * @link       http://dwoo.org/
  18.  * @version    0.9.1
  19.  * @date       2008-05-30
  20.  * @package    Dwoo
  21.  */
  22. {
  23.     public function init($mode "default")
  24.     {
  25.     }
  26.  
  27.     public static function preProcessing(Dwoo_Compiler $compilerarray $params$prepend$append$type)
  28.     {
  29.         return '';
  30.     }
  31.  
  32.     public static function postProcessing(Dwoo_Compiler $compilerarray $params$prepend$append$content)
  33.     {
  34.         $params $compiler->getCompiledParams($params);
  35.  
  36.         $mode trim($params['mode']'"\'');
  37.         switch ($mode{
  38.             case 'js':
  39.             case 'javascript':
  40.                 $content preg_replace('#(?<!:)//\s[^\r\n]*|/\*.*?\*/#',''$content);
  41.  
  42.             case 'default':
  43.             default:
  44.         }
  45.  
  46.         $content preg_replace(array("/\n/","/\r/",'/(<\?(?:php)?|<%)\s*/')array('','','$1 ')preg_replace('#^\s*(.+?)\s*$#m''$1'$content));
  47.  
  48.         return $content;
  49.     }
  50. }

Documentation generated on Sun, 07 Sep 2008 23:57:59 +0200 by phpDocumentor 1.4.0