[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 // Generic Object Module 3 4 eval('class object_EXTENDER extends ' . $last_module . '_ADOConnection { }'); 5 6 class object_ADOConnection extends object_EXTENDER 7 { 8 } 9 10 class ADOFetchObj 11 { 12 } 13 14 eval('class object_resultset_EXTENDER extends ' . $last_module . '_ResultSet { }'); 15 16 class object_ResultSet extends object_resultset_EXTENDER 17 { 18 var _obj; 19 var _names; 20 21 function &FetchObj() 22 { 23 $object =& $this->FetchObject(false); 24 return $object; 25 } 26 27 function &FetchObject($isupper=true) 28 { 29 if (empty($this->_obj)) 30 { 31 $this->_obj = new ADOFetchObj(); 32 $this->_names = array(); 33 for ($i=0; $i <$this->_numOfFields; $i++) 34 { 35 $field = $this->FetchField($i); 36 $this->_names[] = $field->name; 37 } 38 } 39 $i = 0; 40 if (PHP_VERSION >= 5) 41 $object = clone($this->_obj); 42 else $object = $this->_obj; 43 44 for ($i=0; $i <$this->_numOfFields; $i++) 45 { 46 $name = $this->_names[$i]; 47 if ($isupper) 48 $newname = strtoupper($name); 49 else $newname = $name; 50 51 $object->$newname = $this->Fields($name); 52 } 53 return $object; 54 } 55 56 function &FetchNextObj() 57 { 58 $object =& $this->FetchNextObject(false); 59 return $object; 60 } 61 62 function &FetchNextObject($isupper=true) 63 { 64 $object = false; 65 if ($this->_numOfRows != 0 && !$this->EOF) { 66 $object = $this->FetchObject($isupper); 67 $this->_currentRow++; 68 if ($this->_fetch()) 69 return $object; 70 } 71 $this->EOF = true; 72 return $object; 73 } 74 75 } 76 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |