00001 <?php 00002 /* vim: set expandtab tabstop=4 shiftwidth=4: */ 00003 // 00004 // Copyright (c) 2003 Laurent Bedubourg 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License, or (at your option) any later version. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // Authors: Laurent Bedubourg <laurent.bedubourg@free.fr> 00021 // 00022 00030 class Iterable 00031 { 00035 function size(){} 00036 00040 function &getNewIterator(){} 00041 } 00042 00043 00060 class Iterator 00061 { 00069 function reset() 00070 { 00071 return PEAR::raiseError('\'reset\' method not implemented'); 00072 } 00073 00079 function isValid() 00080 { 00081 return PEAR::raiseError('\'isValid\' method not implemented'); 00082 } 00083 00089 function &next() 00090 { 00091 return PEAR::raiseError('\'next\' method not implemented'); 00092 } 00093 00094 // ---------------------------------------------------------------------- 00095 // getters 00096 // ---------------------------------------------------------------------- 00097 00103 function index() 00104 { 00105 return PEAR::raiseError('\'index\' method not implemented'); 00106 } 00107 00113 function &value() 00114 { 00115 return PEAR::raiseError('\'value\' method not implemented'); 00116 } 00117 00118 // ---------------------------------------------------------------------- 00119 // optional methods 00120 // ---------------------------------------------------------------------- 00121 00127 function key() 00128 { 00129 return $this->index(); 00130 } 00131 00138 function remove() 00139 { 00140 return PEAR::raiseError('\'remove\' method not implemented'); 00141 } 00142 } 00143 00149 class ResetFailed extends PEAR_Error 00150 { 00151 } 00152 00153 ?>