Dynamic.class.php

gehe zur Dokumentation dieser Datei
00001 <?php
00002 // ---------------------------------------------------------------------------
00003 // $Id$
00004 // ---------------------------------------------------------------------------
00005 // DaCMS Content Management System
00006 // Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de
00007 //
00008 // This program is free software; you can redistribute it and/or
00009 // modify it under the terms of the GNU General Public License
00010 // as published by the Free Software Foundation; either version 2
00011 // of the License, or (at your option) any later version.
00012 //
00013 // This program is distributed in the hope that it will be useful,
00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 // GNU General Public License for more details.
00017 //
00018 // You should have received a copy of the GNU General Public License
00019 // along with this program; if not, write to the Free Software
00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00021 // ---------------------------------------------------------------------------
00022 // $Log$
00023 // Revision 1.4  2005-01-03 19:38:03  dankert
00024 // Neue Methode outputLn
00025 //
00026 // Revision 1.3  2004/12/19 21:49:02  dankert
00027 // Methode pathToObject()
00028 //
00029 // Revision 1.2  2004/12/19 15:25:12  dankert
00030 // Anpassung Session-Funktionen
00031 //
00032 // Revision 1.1  2004/12/15 23:14:21  dankert
00033 // *** empty log message ***
00034 //
00035 // Revision 1.5  2004/11/10 22:50:10  dankert
00036 // Neue Methode execute()
00037 //
00038 // Revision 1.4  2004/10/06 09:53:39  dankert
00039 // Benutzung auch nicht-statisch
00040 //
00041 // Revision 1.3  2004/05/03 20:21:34  dankert
00042 // neu: setObjectId()
00043 //
00044 // Revision 1.2  2004/05/02 15:04:16  dankert
00045 // Einf?gen package-name (@package)
00046 //
00047 // Revision 1.1  2004/04/24 17:03:29  dankert
00048 // Initiale Version
00049 //
00050 // ---------------------------------------------------------------------------
00051 
00060 class Dynamic
00061 {
00062      var $project;
00063      var $output   = '';
00064      var $objectid = 0;
00065      var $page;
00066      var $parameters  = array();
00067      var $description = '';
00068      
00069      
00070      function db()
00071      {
00072           return db_connection();
00073      }
00074 
00075      function getObjectId()
00076      {
00077           return $this->objectid;
00078      }
00079 
00080      function &getObject()
00081      {
00082           return Session::getObject();
00083      }
00084 
00085      function setObjectId( $objectid )
00086      {
00087           $this->objectid = $objectid;
00088      }
00089 
00090      function getRootObjectId()
00091      {
00092           $project = Session::getProject();
00093           return $project->getRootObjectId();
00094      }
00095 
00096      function folderid()
00097      {
00098           global $SESS;
00099           return $SESS['folderid'];
00100      }
00101 
00102 
00103      function execute()
00104      {
00105           // overwrite this in subclasses
00106      }    
00107      
00108      function delOutput()
00109      {
00110           $this->output = '';
00111      }
00112      
00113      function output( $text )
00114      {
00115           $this->output .= $text;
00116      }
00117 
00118      function outputLn( $text )
00119      {
00120           $this->output .= $text."\n";
00121      }
00122 
00123 
00124      function getOutput()
00125      {
00126           return $this->output;
00127      }
00128      
00129      function setSessionVar( $var,$value )
00130      {
00131           Session::set( $var,$value );
00132      }
00133 
00134 
00135      function getSessionVar( $var )
00136      {
00137           return Session::get( $var );
00138      }
00139 
00140 
00141      function pathToObject( $obj )
00142      {
00143           if   ( is_object($obj) )
00144                return $this->page->path_to_object($obj->objectid);
00145           else
00146                return $this->page->path_to_object($obj);
00147      }
00148 
00149 }

Erzeugt am Thu May 14 00:55:49 2009 für OpenRat von  doxygen 1.5.8