[svn-components] 3344 - trunk/Mail/src [eZComponents: Trunk]

Derick Rethans dr@ez.no
Sat, 19 Aug 2006 13:57:10 +0200


Author: Derick Rethans
Date: 2006-08-19 13:57:09 +0200 (Sat, 19 Aug 2006)
New Revision: 3344

Log:
- Clean this up a bit and make sure all properties that are arrays have the
  (array) cast.

Modified:
   trunk/Mail/src/mail.php

Modified: trunk/Mail/src/mail.php
===================================================================
--- trunk/Mail/src/mail.php	2006-08-19 11:53:21 UTC (rev 3343)
+++ trunk/Mail/src/mail.php	2006-08-19 11:57:09 UTC (rev 3344)
@@ -178,45 +178,23 @@
     {
         switch ( $name )
         {
-            case 'from':
-                return $this->properties['from'];
-                break;
-
             case 'to':
-                return $this->properties['to'];
-                break;
-
             case 'cc':
-                return (array) $this->properties['cc'];
-                break;
-
             case 'bcc':
-                return (array) $this->properties['bcc'];
-                break;
+                return (array) $this->properties[$name];
 
+            case 'from':
             case 'subject':
-                return $this->properties['subject'];
-                break;
-
             case 'subjectCharset':
-                return $this->properties['subjectCharset'];
-                break;
-
             case 'body':
-                return $this->properties['body'];
-                break;
-
             case 'messageID':
-                return $this->properties['messageID'];
-                break;
+                return $this->properties[$name];
 
             case 'timestamp':
                 return strtotime( $this->getHeader( "Date" ) );
-                break;
 
             default:
                 return parent::__get( $name );
-                break;
         }
     }