Author: jablko
Date: Tue Aug 11 12:51:57 2009
New Revision: 3006

Log:
Implement ArrayAccess in sfComponent

Modified:
   trunk/lib/vendor/symfony/lib/action/sfComponent.class.php

Modified: trunk/lib/vendor/symfony/lib/action/sfComponent.class.php
==============================================================================
--- trunk/lib/vendor/symfony/lib/action/sfComponent.class.php   Tue Aug 11 
12:24:12 2009        (r3005)
+++ trunk/lib/vendor/symfony/lib/action/sfComponent.class.php   Tue Aug 11 
12:51:57 2009        (r3006)
@@ -16,7 +16,7 @@
  * @author     Fabien Potencier <[email protected]>
  * @version    SVN: $Id: sfComponent.class.php 20048 2009-07-09 09:53:03Z 
FabianLange $
  */
-abstract class sfComponent
+abstract class sfComponent implements ArrayAccess
 {
   protected
     $moduleName             = '',
@@ -312,6 +312,13 @@
     return $this->varHolder->setByRef($key, $value);
   }
 
+  public function offsetSet($offset, $value)
+  {
+    $args = func_get_args();
+
+    return call_user_func_array(array($this, '__set'), $args);
+  }
+
   /**
    * Gets a variable for the template.
    *
@@ -330,6 +337,13 @@
     return $this->varHolder->get($key);
   }
 
+  public function offsetGet($offset)
+  {
+    $args = func_get_args();
+
+    return call_user_func_array(array($this, '__get'), $args);
+  }
+
   /**
    * Returns true if a variable for the template is set.
    *
@@ -346,6 +360,13 @@
     return $this->varHolder->has($name);
   }
 
+  public function offsetExists($offset)
+  {
+    $args = func_get_args();
+
+    return call_user_func_array(array($this, '__isset'), $args);
+  }
+
   /**
    * Removes a variable for the template.
    *
@@ -360,6 +381,13 @@
     $this->varHolder->remove($name);
   }
 
+  public function offsetUnset($offset)
+  {
+    $args = func_get_args();
+
+    return call_user_func_array(array($this, '__unset'), $args);
+  }
+
   /**
    * Calls methods defined via sfEventDispatcher.
    *

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to