Source for file Route.php
Documentation is available at Route.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* ScriptReorganizer Strategy :: Route
* 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
* @package ScriptReorganizer
* @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
* Implements <kbd>ScriptReorganizer_Strategy</kbd>
require_once 'ScriptReorganizer/Strategy.php';
* Reorganizes scripts by replacing two or more consecutive blank lines with a single
* @package ScriptReorganizer
* @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: @package_version@
* @link http://pear.php.net/package/ScriptReorganizer
// {{{ 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 );
* c-hanging-comment-ender-p: nil
Documentation generated on Mon, 11 Mar 2019 14:10:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|