diff --git a/lib/Net/LDAP3.php b/lib/Net/LDAP3.php
index a9f196c7ccf0bc1c462b2bcb4d0f74f51f9b8428..815eeac5e3fca6b54b15b787576540258e04d081 100644
--- a/lib/Net/LDAP3.php
+++ b/lib/Net/LDAP3.php
@@ -41,6 +41,7 @@ require_once __DIR__ . '/LDAP3/Result.php';
  */
 class Net_LDAP3
 {
+
     const CONTROL_EFFECTIVE_RIGHTS = '1.3.6.1.4.1.42.2.27.9.5.2';
     const CONTROL_SORT_REQUEST     = '1.2.840.113556.1.4.473';
     const CONTROL_VLV_REQUEST      = '2.16.840.1.113730.3.4.9';
@@ -122,7 +123,17 @@ class Net_LDAP3
     protected $_current_host;
     protected $_metadata;
     protected $_vlv_indexes_and_searches;
+    protected $values = array();
+
+    public function __get( $key )
+    {
+        return $this->values[ $key ];
+    }
 
+    public function __set( $key, $value )
+    {
+        $this->values[ $key ] = $value;
+    }
 
     /**
      * Constructor
diff --git a/lib/Net/LDAP3/Result.php b/lib/Net/LDAP3/Result.php
index 8ee788a721b94c3bf33764d2887e8763cacccbff..d04e0f1203d6157d15e1136b94c98c3aafb85045 100644
--- a/lib/Net/LDAP3/Result.php
+++ b/lib/Net/LDAP3/Result.php
@@ -38,6 +38,7 @@
  */
 class Net_LDAP3_Result implements Iterator
 {
+    protected $values = array();
     protected $conn;
     protected $base_dn;
     protected $filter;
@@ -48,6 +49,16 @@ class Net_LDAP3_Result implements Iterator
     private $current;
     private $iteratorkey = 0;
 
+    public function __get( $key )
+    {
+        return $this->values[ $key ];
+    }
+
+    public function __set( $key, $value )
+    {
+        $this->values[ $key ] = $value;
+    }
+
     /**
      * Default constructor
      *