Source for file Quiet.php
Documentation is available at Quiet.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* ScriptReorganizer Strategy :: Quiet
* 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: Quiet.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';
* Uses <kbd>ScriptReorganizer_Strategy_Route</kbd>
require_once 'ScriptReorganizer/Strategy/Route.php';
* Reorganizes scripts by stripping off single and multiple line comments as well as
* by applying the {@link ScriptReorganizer_Strategy_Route Route} strategy.
* @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 __construct()
// {{{ 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 )
'multiLineComments' => '"[{};,' . $eol . ']([ \t]*/\*(.|[' . $eol . '])*?\*/)"',
'singleLineComments' => '"[{};,' . $eol . ']([ \t]*//[^' . $eol . ']*)"'
foreach ( $identifiers as $identifier ) {
foreach ( $matches[1 ] as $comment ) {
return $this->route->reformat( $content, $eol );
// {{{ private properties
* Holds the helper strategy
* @var ScriptReorganizer_Strategy_Route
* 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.
|