IndexInfo.php

Go to the documentation of this file.
00001 <?php 00002 /* 00003 * $Id: IndexInfo.php,v 1.2 2004/05/02 21:12:23 micha Exp $ 00004 * 00005 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00006 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00007 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00008 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00009 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00010 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00011 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00012 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00013 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00014 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00015 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00016 * 00017 * This software consists of voluntary contributions made by many individuals 00018 * and is licensed under the LGPL. For more information please see 00019 * <http://creole.phpdb.org>. 00020 */ 00021 00030 class IndexInfo 00031 { 00033 var $name; 00034 00036 var $columns = array(); 00037 00038 function IndexInfo($name) 00039 { 00040 $this->name = $name; 00041 } 00042 00043 function getName() 00044 { 00045 return $this->name; 00046 } 00047 00052 function addColumn(&$column) 00053 { 00054 if (! is_a($column, 'ColumnInfo')) { 00055 trigger_error( 00056 "IndexInfo::addColumn(): parameter 1 not of type 'ColumnInfo' !", 00057 E_USER_ERROR 00058 ); 00059 } 00060 00061 $this->columns[] =& $column; 00062 } 00063 00064 function & getColumns() 00065 { 00066 return $this->columns; 00067 } 00068 00069 function toString() 00070 { 00071 return $this->name; 00072 } 00073 }

This file is part of the Creole[php4] library.


Copyright © 2004 Hans Lellelid  
Creole[php4] CVS