eZ Publish  [4.0]
eznulldb.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // $Id$
00004 //
00005 // Definition of eZNullDB class
00006 //
00007 // Created on: <12-Feb-2002 15:54:17 bf>
00008 //
00009 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00010 // SOFTWARE NAME: eZ Publish
00011 // SOFTWARE RELEASE: 4.0.x
00012 // COPYRIGHT NOTICE: Copyright (C) 1999-2008 eZ Systems AS
00013 // SOFTWARE LICENSE: GNU General Public License v2.0
00014 // NOTICE: >
00015 //   This program is free software; you can redistribute it and/or
00016 //   modify it under the terms of version 2.0  of the GNU General
00017 //   Public License as published by the Free Software Foundation.
00018 //
00019 //   This program is distributed in the hope that it will be useful,
00020 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00021 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022 //   GNU General Public License for more details.
00023 //
00024 //   You should have received a copy of version 2.0 of the GNU General
00025 //   Public License along with this program; if not, write to the Free
00026 //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00027 //   MA 02110-1301, USA.
00028 //
00029 //
00030 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00031 //
00032 
00033 /*!
00034   \class eZNullDB eznulldb.php
00035   \ingroup eZDB
00036   \brief The eZNullDB class provides a interface which does nothing
00037 
00038   This class is returned when a proper implementation could not be found.
00039 */
00040 
00041 //include_once( 'lib/ezdb/classes/ezdbinterface.php' );
00042 
00043 class eZNullDB extends eZDBInterface
00044 {
00045     /*!
00046       Does nothing.
00047     */
00048     function eZNullDB( $parameters )
00049     {
00050         $this->eZDBInterface( $parameters );
00051     }
00052 
00053     /*!
00054       Does nothing.
00055     */
00056     function databaseName()
00057     {
00058         return 'null';
00059     }
00060 
00061     /*!
00062       Returns false.
00063     */
00064     function query( $sql, $server = false )
00065     {
00066         return false;
00067     }
00068 
00069     /*!
00070       Returns false.
00071     */
00072     function arrayQuery( $sql, $params = array(), $server = false )
00073     {
00074         return false;
00075     }
00076 
00077     /*!
00078       Does nothing.
00079     */
00080     function lock( $table )
00081     {
00082     }
00083 
00084     /*!
00085       Does nothing.
00086     */
00087     function unlock()
00088     {
00089     }
00090 
00091     /*!
00092       Does nothing.
00093     */
00094     function begin()
00095     {
00096     }
00097 
00098     /*!
00099       Does nothing.
00100     */
00101     function commit()
00102     {
00103     }
00104 
00105     /*!
00106       Does nothing.
00107     */
00108     function rollback()
00109     {
00110     }
00111 
00112     /*!
00113       Returns false.
00114     */
00115     function lastSerialID( $table = false, $column = false )
00116     {
00117         return false;
00118     }
00119 
00120     /*!
00121       Returns $str.
00122     */
00123     function escapeString( $str )
00124     {
00125         return $str;
00126     }
00127 
00128     /*!
00129       Does nothing.
00130     */
00131     function close()
00132     {
00133     }
00134 }
00135 
00136 ?>