* @package Horde_Db
* @subpackage Adapter
*/
-class Horde_Db_Adapter_Base_Table
+class Horde_Db_Adapter_Base_Table implements ArrayAccess, IteratorAggregate
{
protected $_name;
protected $_primaryKey;
/*##########################################################################
+ # Object composition
+ ##########################################################################*/
+
+ public function __get($key)
+ {
+ return $this->getColumn($key);
+ }
+
+ public function __isset($key)
+ {
+ return isset($this->_columns[$key]);
+ }
+
+
+ /*##########################################################################
+ # ArrayAccess
+ ##########################################################################*/
+
+ /**
+ * ArrayAccess: Check if the given offset exists
+ *
+ * @param int $offset
+ * @return boolean
+ */
+ public function offsetExists($offset)
+ {
+ return isset($this->_columns[$column]);
+ }
+
+ /**
+ * ArrayAccess: Return the value for the given offset.
+ *
+ * @param int $offset
+ * @return object {@link {@Horde_Db_Adapter_Base_ColumnDefinition}
+ */
+ public function offsetGet($offset)
+ {
+ return $this->getColumn($offset);
+ }
+
+ /**
+ * ArrayAccess: Set value for given offset
+ *
+ * @param int $offset
+ * @param mixed $value
+ */
+ public function offsetSet($offset, $value)
+ {
+ }
+
+ /**
+ * ArrayAccess: remove element
+ *
+ * @param int $offset
+ */
+ public function offsetUnset($offset)
+ {
+ }
+
+
+ /*##########################################################################
+ # IteratorAggregate
+ ##########################################################################*/
+
+ public function getIterator()
+ {
+ return new ArrayIterator($this->_columns);
+ }
+
+
+ /*##########################################################################
# Protected
##########################################################################*/