Source for file replace.php

Documentation is available at replace.php

  1. <?php
  2.  
  3. /**
  4.  * Replaces the search string by the replace string
  5.  * <pre>
  6.  *  * value : the string to search into
  7.  *  * search : the string to search for
  8.  *  * replace : the string to use as a replacement
  9.  * </pre>
  10.  * This software is provided 'as-is', without any express or implied warranty.
  11.  * In no event will the authors be held liable for any damages arising from the use of this software.
  12.  *
  13.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  14.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  15.  * @license    http://dwoo.org/LICENSE   Modified BSD License
  16.  * @link       http://dwoo.org/
  17.  * @version    1.0.0
  18.  * @date       2008-10-23
  19.  * @package    Dwoo
  20.  */
  21. function Dwoo_Plugin_replace_compile(Dwoo_Compiler $compiler$value$search$replace$case_sensitive true)
  22. {
  23.     if ($case_sensitive == 'false' || (bool)$case_sensitive === false{
  24.         return 'str_ireplace('.$search.', '.$replace.', '.$value.')';
  25.     else {
  26.         return 'str_replace('.$search.', '.$replace.', '.$value.')';
  27.     }
  28. }

Documentation generated on Sun, 07 Feb 2010 17:53:55 +0000 by phpDocumentor 1.4.0