• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List

E:/E/GEAMP/www/openbiz/openbiz/bin/data/DataSet.php

00001 <?php
00026 class DataSet implements Iterator, ArrayAccess, Countable 
00027 {
00033     protected $m_var = array();
00034 
00040     protected $m_BizObj = null;
00041 
00049     public function __construct($bizObj)
00050     {
00051         $this->m_BizObj = $bizObj;
00052     }
00053 
00054     // Iterator methods BEGIN---------
00055 
00062     public function get($key)
00063     {
00064         return isset($this->m_var[$key]) ? $this->m_var[$key] : null;
00065     }
00066 
00073     public function set($key, $val)
00074     {
00075         $this->m_var[$key] = $val;
00076 
00077     }
00078 
00084     public function rewind()
00085     { 
00086         reset($this->m_var);
00087     }
00088 
00094     public function current()
00095     { 
00096         return current($this->m_var);
00097     }
00098 
00099 
00105     public function key()
00106     { 
00107         return key($this->m_var);
00108     }
00109 
00115     public function next()
00116     { 
00117         return next($this->m_var);
00118     }
00119 
00125     public function valid()
00126     { 
00127         return $this->current() !== false;
00128     }
00129     
00130     // ArrayAccess methods
00131     
00138     public function offsetExists($key)
00139     { 
00140         return isset($this->m_var[$key]);
00141     }
00142 
00149     public function offsetGet($key)
00150     { 
00151         return $this->get($key);
00152     }
00153 
00160     public function offsetSet($key, $value)
00161     { 
00162         $this->set($key, $value);
00163     }
00164 
00170     public function offsetUnset($key)
00171     { 
00172         unset($this->m_var[$key]);
00173     }
00174     
00175     public function count() 
00176     {
00177         return count($this->m_var);
00178     }
00179 
00185     public function toArray()
00186     {
00187         return $this->m_var;
00188     }
00189 
00196     public function getRefObject($objName)
00197     {
00198         return $this->m_BizObj->getRefObject($objName);
00199     }
00200 
00201 }
00202 ?>

Generated on Thu Apr 19 2012 17:09:13 for openbiz by  doxygen 1.7.2