Source for file PHPFile.class.php
Documentation is available at PHPFile.class.php
* For including this file you have to define the constant "CLASSPATH".
* Because every include in the framework depends on the CLASSPATH definition.
* The CLASSPATH means the relative path to the folder that contains the
echo "<h3>You have to define the constant CLASSPATH!</h3>\n";
echo "Example: define( 'CLASSPATH', '../path/to/classes/' );\n";
require_once( CLASSPATH. "filesystem/Files.class.php" );
* A class to create php-files who using this class-library.
* @author Daniel Plücken <daniel@debakel.net>
* @license http://www.gnu.org/copyleft/lesser.html
* GNU Lesser General Public License
* @copyright Copyright (c) 2003 Daniel Plücken <daniel@debakel.net>
* 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.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
* @var string $pathtoclasses
var $includes = array( "html/HTMLDocument.inc.php" );
* @author Daniel Plücken <daniel@debakel.net>
* @param string $path_and_filename
* @param string $filename
$this->Files( $param[0], $param[1] );
* Sets pathtoclasses, the variable of this object, that should contain the
* path to the class library relatively from the location of this file.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $string the path to the class-library relativly from the
* Sets htmldoc, the variable of this object, that should contain the
* object's reference of the html-document whose sourcecode will be
* written if this object will be printed.
* @author Daniel Plücken <daniel@debakel.net>
* @param HTMLDocument $doc_ref The path to the class-library relativly
* from the location of this file.
* Adds a sourcepath to the array "includes" of this object.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $string The path to a script in the class-library.
* Adds items to the object that is referenced in the object's variable
* @author Daniel Plücken <daniel@debakel.net>
* @param HTMLDocument $item_ref
{ $this->htmldoc->addItem( $item_ref ); }
* Returns the source of the generated php-file.
* @author Daniel Plücken <daniel@debakel.net>
$outputstr .= "\x24classpath = \""
$outputstr .= "include( \x24classpath.\"". $this->includes[$i]. "\" );\n";
$outputstr .= $this->htmldoc->getPHPSource();
} // END of class PHPFile
|