| [ Index ] |
PHP Cross Reference of Web Application Component Toolkit |
[Summary view] [Print] [Text view]
1 <?php 2 //-------------------------------------------------------------------------------- 3 // Copyright 2003 Procata, Inc. 4 // Released under the LGPL license (http://www.gnu.org/copyleft/lesser.html) 5 //-------------------------------------------------------------------------------- 6 /** 7 * @package WACT_UTIL 8 * @version $Id: datasetdecorator.inc.php,v 1.6 2004/11/26 18:24:43 jeffmoore Exp $ 9 */ 10 11 /** 12 * Provides a base class to use for decorating DataSpaces 13 * @see http://wact.sourceforge.net/index.php/DataSpaceDecorator 14 * @access public 15 * @package WACT_UTIL 16 */ 17 class DataSpaceDecorator /* implements DataSource */ { 18 /** 19 * The data set being decorated 20 * @var object 21 * @access private 22 */ 23 var $dataset; 24 25 /** 26 * Constructs DataSetDecorator 27 * @param object data set to decorate 28 * @access public 29 */ 30 function DataSpaceDecorator(&$dataset) { 31 $this->dataset =& $dataset; 32 } 33 34 function get($name) { 35 return $this->dataset->get($name); 36 } 37 38 function set($name, $value) { 39 $this->dataset->set($name, $value); 40 } 41 42 function remove($name) { 43 $this->dataset->remove($name); 44 } 45 46 function removeAll() { 47 $this->dataset->removeAll(); 48 } 49 50 function import($property_list) { 51 $this->dataset->import($property_list); 52 } 53 54 function merge($property_list) { 55 $this->dataset->merge($property_list); 56 } 57 58 function &export() { 59 return $this->dataset->export(); 60 } 61 62 function isDataSource() { 63 return TRUE; 64 } 65 66 function hasProperty($name) { 67 return $this->dataset->hasProperty($name); 68 } 69 70 /** 71 * @param object instance of filter class containing a doFilter() method 72 * @return void 73 * @access public 74 */ 75 function registerFilter(&$filter) { 76 $this->dataset->registerFilter($filter); 77 } 78 79 /** 80 * @return void 81 * @access protected 82 */ 83 function prepare() { 84 $this->dataset->prepare(); 85 } 86 } 87 88 89 /** 90 * Provides a base class to use for decorating datasets 91 * @see http://wact.sourceforge.net/index.php/DataSetDecorator 92 * @access public 93 * @package WACT_UTIL 94 */ 95 class DataSetDecorator extends DataSpaceDecorator /* implements Interator */ { 96 97 /** 98 * Constructs DataSetDecorator 99 * @param object data set to decorate 100 * @access public 101 */ 102 function DataSetDecorator(&$dataset) { 103 parent::DataSpaceDecorator($dataset); 104 } 105 106 function reset() { 107 $this->dataset->reset(); 108 } 109 110 function next() { 111 return $this->dataset->next(); 112 } 113 114 } 115 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Sun Nov 28 19:36:09 2004 | Cross-referenced by PHPXref 0.5 |