1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8class Search_Index_AbstractIndexDecorator implements Search_Index_Interface 9{ 10 protected $parent; 11 12 function __construct(Search_Index_Interface $index) 13 { 14 $this->parent = $index; 15 } 16 17 function addDocument(array $document) 18 { 19 return $this->parent->addDocument($document); 20 } 21 22 function invalidateMultiple(array $query) 23 { 24 return $this->parent->invalidateMultiple($query); 25 } 26 27 function endUpdate() 28 { 29 return $this->parent->endUpdate(); 30 } 31 32 function find(Search_Query_Interface $query, $resultStart, $resultCount) 33 { 34 return $this->parent->find($query, $resultStart, $resultCount); 35 } 36 37 function getTypeFactory() 38 { 39 return $this->parent->getTypeFactory(); 40 } 41 42 function optimize() 43 { 44 return $this->parent->optimize(); 45 } 46 47 function destroy() 48 { 49 return $this->parent->destroy(); 50 } 51 52 function exists() 53 { 54 return $this->parent->exists(); 55 } 56 57 function getMatchingQueries(array $document) 58 { 59 return $this->parent->getMatchingQueries($document); 60 } 61 62 function store($name, Search_Expr_Interface $expr) 63 { 64 return $this->parent->store($name, $expr); 65 } 66 67 function unstore($name) 68 { 69 return $this->parent->unstore($name); 70 } 71 72 function getRealIndex() 73 { 74 if ($this->parent instanceof self) { 75 return $this->parent->getRealIndex(); 76 } else { 77 return $this->parent; 78 } 79 } 80} 81