예제 #1
0
 /**
  * Any requests to set or get attributes or call methods on this class that 
  * are not found are redirected to the {@link Swift_Mime_Message} object.
  * @param string the attribute name
  */
 public function __set($name, $value)
 {
     try {
         return parent::__set($name, $value);
     } catch (CException $e) {
         $setter = 'set' . $name;
         if (method_exists($this->message, $setter)) {
             $this->message->{$setter}($value);
         } else {
             throw $e;
         }
     }
 }
예제 #2
0
 public function __set($name, $val)
 {
     try {
         return parent::__set($name, $val);
     } catch (CException $e) {
         $method_name = Yii::app()->text->underscoreToCamelcase($name);
         $method_name = 'set' . ucfirst($method_name);
         if (method_exists($this, $method_name)) {
             return $this->{$method_name}($val);
         } else {
             throw new CException($e->getMessage());
         }
     }
 }
 public function __set($name, $value)
 {
     $setter = 'set' . $name;
     if (false !== method_exists($this, $setter)) {
         return call_user_func_array(array($this, $setter), array($value));
     } else {
         if (false !== property_exists($this, $name)) {
             return $this->{$name} = $value;
         } else {
             if (false !== $this->getIsProxy() && false !== method_exists($this->_instance, $setter)) {
                 return call_user_func_array(array($this->_instance, $setter), array($value));
             } else {
                 if (false !== $this->getIsProxy() && false !== property_exists($this->_instance, $name)) {
                     return $this->_instance->{$name} = $value;
                 }
             }
         }
     }
     return parent::__set($name, $value);
 }
예제 #4
0
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case 'objCart':
             $this->objCart = $mixValue;
             return;
         case 'CheckoutForm':
             $this->CheckoutForm = $mixValue;
             return;
         default:
             return parent::__set($strName, $mixValue);
     }
 }