adding index files in order to prevent directory listing.
[squirrelmail.git] / class / mime / AddressStructure.class.php
index 91e04e27c87046ebe3a7fb692b551a49aae75199..97ebb532b1fb3e4a624b9b715216adae4a55b1cc 100644 (file)
@@ -3,21 +3,57 @@
 /**
  * AddressStructure.class.php
  *
- * Copyright (c) 2003 The SquirrelMail Project Team
+ * Copyright (c) 2003-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
- * This contains functions needed to handle mime messages.
+ * This file contains functions needed to extract email address headers from 
+ * mime messages.
  *
- * $Id$
+ * @version $Id$
+ * @package squirrelmail
+ * @subpackage mime
+ * @since 1.3.2
  */
 
+/**
+ * Class used to work with email address headers
+ * @package squirrelmail
+ * @subpackage mime
+ * @since 1.3.2
+ */
 class AddressStructure {
-    var $personal = '',
-        $adl      = '',
-        $mailbox  = '',
-        $host     = '',
-        $group    = '';
+    /**
+     * Personal information
+     * @var string
+     */
+    var $personal = '';
+    /**
+     * @todo check use of this variable. var is not used in class.
+     * @var string
+     */
+    var $adl      = '';
+    /**
+     * Mailbox name.
+     * @var string
+     */
+    var $mailbox  = '';
+    /**
+     * Server address.
+     * @var string
+     */
+    var $host     = '';
+    /**
+     * @todo check use of this variable. var is not used in class.
+     * @var string
+     */
+    var $group    = '';
 
+    /**
+     * Return address information from mime headers.
+     * @param boolean $full return full address (true) or only email (false)
+     * @param boolean $encoded (since 1.4.0) return rfc2047 encoded address (true) or plain text (false).
+     * @return string
+     */
     function getAddress($full = true, $encoded = false) {
         $result = '';
         if (is_object($this)) {
@@ -42,7 +78,7 @@ class AddressStructure {
                     }
                 }
                 $addr = ($email ? $personal . ' <' .$email.'>'
-                        : $this->personal);                                    
+                        : $this->personal);
                 $best_dpl = $this->personal;
             } else {
                 $addr = $email;
@@ -52,10 +88,15 @@ class AddressStructure {
         }
         return $result;
     }
-    
+
+    /**
+     * Shorter version of getAddress() function
+     * Returns full encoded address.
+     * @return string
+     * @since 1.4.0
+     */
     function getEncodedAddress() {
         return $this->getAddress(true, true);
     }
 }
-
-?>
+?>
\ No newline at end of file