Source for file indent.php

Documentation is available at indent.php

  1. <?php
  2.  
  3. /**
  4.  * Indents every line of a text by the given amount of characters
  5.  * <pre>
  6.  *  * value : the string to indent
  7.  *  * by : how many characters should be inserted before each line
  8.  *  * char : the character(s) to insert
  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_indent_compile(Dwoo_Compiler $compiler$value$by=4$char=' ')
  22. {
  23.     return "preg_replace('#^#m', '".str_repeat(substr($char1-1)trim($by'"\''))."', $value)";
  24. }

Documentation generated on Sat, 18 Jul 2009 21:05:10 +0200 by phpDocumentor 1.4.0