Source for file AddHeader.php
Documentation is available at AddHeader.php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
* ScriptReorganizer Type Decorator :: AddHeader
* 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
* @subpackage Type_Decorator
* @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: AddHeader.php 32 2005-10-30 22:05:19Z stefanorausch $
* @link http://pear.php.net/package/ScriptReorganizer
* Depends on <kbd>ScriptReorganizer_Type</kbd>
require_once 'ScriptReorganizer/Type.php';
* Extends <kbd>ScriptReorganizer_Type_Decorator</kbd>
require_once 'ScriptReorganizer/Type/Decorator.php';
* Throws <kbd>ScriptReorganizer_Type_Decorator_Exception</kbd>
require_once 'ScriptReorganizer/Type/Decorator/Exception.php';
* Decorator for adding a header to the script to reorganize
* ANN: Decoration of a directly sequencing Pharize-Decorator is not allowed.
* @package ScriptReorganizer
* @subpackage Type_Decorator
* @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( ScriptReorganizer_Type $type, $header = '' )
* @param ScriptReorganizer_Type $type a <kbd>ScriptReorganizer_Type</kbd> to
* @param string $header a string representing the (optional) default header to
* @throws {@link ScriptReorganizer_Type_Decorator_Exception ScriptReorganizer_Type_Decorator_Exception}
public function __construct( ScriptReorganizer_Type $type, $header = '' )
if ( class_exists( 'ScriptReorganizer_Type_Decorator_Pharize', false ) ) {
'Decoration of a directly sequencing Pharize-Decorator not allowed'
// {{{ public function reformat( $header = null )
* Reorganizes the script's content by applying the chosen
* {@link ScriptReorganizer_Strategy Strategy}
* @param string $header a string representing the (optional) overriding header
* @throws {@link ScriptReorganizer_Type_Decorator_Exception ScriptReorganizer_Type_Decorator_Exception}
public function reformat( $header = null )
if ( null !== $header ) {
'Argument $header for AddHeader-Decorator not of type string'
// {{{ private properties
* Holds the header to prepend
* c-hanging-comment-ender-p: nil
Documentation generated on Mon, 11 Mar 2019 14:10:29 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|