Documentation is available at Route.php
- <?php
- /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
- /**
- * ScriptReorganizer Strategy :: Route
- *
- * PHP version 5
- *
- * LICENSE: This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option) any
- * later version.
- *
- * @category Tools
- * @package ScriptReorganizer
- * @subpackage Strategy
- * @author Stefano F. Rausch <stefano@rausch-e.net>
- * @copyright 2005 Stefano F. Rausch <stefano@rausch-e.net>
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version SVN: $Id: Route.php 21 2005-09-26 15:55:48Z stefanorausch $
- * @link http://pear.php.net/package/ScriptReorganizer
- * @filesource
- */
- /**
- * Implements <kbd>ScriptReorganizer_Strategy</kbd>
- */
- require_once 'ScriptReorganizer/Strategy.php';
- /**
- * Basic strategy
- *
- * Reorganizes scripts by replacing two or more consecutive blank lines with a single
- * one.
- *
- * @category Tools
- * @package ScriptReorganizer
- * @subpackage Strategy
- * @author Stefano F. Rausch <stefano@rausch-e.net>
- * @copyright 2005 Stefano F. Rausch <stefano@rausch-e.net>
- * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
- * @version Release: 0.4.0
- * @link http://pear.php.net/package/ScriptReorganizer
- */
- class ScriptReorganizer_Strategy_Route implements ScriptReorganizer_Strategy
- {
- // {{{ public function reformat( & $content, $eol )
- /**
- * Performs the main reorganization of the script's content
- *
- * @param string &$content a string representing the script's content
- * @param string $eol a string representing the EOL identifier to use
- * @return string a string representing the reorganized content
- */
- public function reformat( & $content, $eol )
- {
- $multiBlankLines = '"([ \t]*[' . $eol . ']){3,}"';
- $result = preg_replace( $multiBlankLines, $eol . $eol, $content );
- return $result;
- }
- // }}}
- }
- /*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * c-hanging-comment-ender-p: nil
- * End:
- */
- ?>
Documentation generated on Tue, 22 Nov 2005 01:57:13 +0100 by phpDocumentor 1.3.0RC3