/** * Sets the property $name to $value. * * @throws ezcBasePropertyNotFoundException * if the property does not exist. * @param string $name * @param mixed $value * @ignore */ public function __set($name, $value) { switch ($name) { case 'mail': $this->properties[$name] = $value; break; default: return parent::__set($name, $value); break; } }
/** * Sets the property $name to $value. * * @throws ezcBasePropertyNotFoundException * if the property does not exist. * @throws ezcBasePropertyPermissionException * if the property is read-only. * @param string $name * @param mixed $value * @ignore */ public function __set($name, $value) { switch ($name) { case 'from': case 'returnPath': if ($value !== null && !$value instanceof ezcMailAddress) { throw new ezcBaseValueException($name, $value, 'ezcMailAddress or null'); } $this->properties[$name] = $value; break; case 'to': case 'cc': case 'bcc': if (!is_array($value)) { throw new ezcBaseValueException($name, $value, 'array( ezcMailAddress )'); } foreach ($value as $key => $obj) { if (!$obj instanceof ezcMailAddress) { throw new ezcBaseValueException("{$name}[{$key}]", $obj, 'ezcMailAddress'); } } $this->properties[$name] = $value; break; case 'subject': $this->properties['subject'] = trim($value); break; case 'subjectCharset': $this->properties['subjectCharset'] = $value; break; case 'body': if (!$value instanceof ezcMailPart) { throw new ezcBaseValueException($name, $value, 'ezcMailPart'); } $this->properties['body'] = $value; break; case 'messageId': case 'messageID': $this->properties['messageId'] = $value; break; case 'timestamp': throw new ezcBasePropertyPermissionException($name, ezcBasePropertyPermissionException::READ); break; default: parent::__set($name, $value); break; } }
/** * Sets the property $name to $value. * * @throws ezcBasePropertyNotFoundException * if the property does not exist. * @param string $name * @param mixed $value * @ignore */ public function __set($name, $value) { switch ($name) { case 'fileName': $this->properties['fileName'] = $value; break; case 'mimeType': $this->properties['mimeType'] = $value; break; case 'contentType': $this->properties['contentType'] = $value; break; case 'dispositionType': $this->properties['dispositionType'] = $value; break; case 'contentId': $this->properties['contentId'] = $value; $this->setHeader('Content-ID', '<' . $value . '>'); break; default: return parent::__set($name, $value); break; } }
/** * Sets the property $name to $value. * * @throws ezcBasePropertyNotFoundException * if the property does not exist. * @param string $name * @param mixed $value * @ignore */ public function __set($name, $value) { switch ($name) { case 'boundary': $this->properties[$name] = $value; $this->setHeader('Content-Type', 'multipart/' . $this->multipartType() . '; ' . 'boundary="' . $this->boundary . '"'); break; case 'noMimeMessage': $this->properties[$name] = $value; break; default: return parent::__set($name, $value); break; } }
/** * Sets the property $name to $value. * * @throws ezcBasePropertyNotFoundException * if the property does not exist. * @throws ezcBasePropertyPermissionException * if the property is read-only. * @param string $name * @param mixed $value * @ignore */ public function __set($name, $value) { switch ($name) { case 'from': $this->properties['from'] = $value; break; case 'to': $this->properties['to'] = $value; break; case 'cc': $this->properties['cc'] = $value; break; case 'bcc': $this->properties['bcc'] = $value; break; case 'subject': $this->properties['subject'] = trim($value); break; case 'subjectCharset': $this->properties['subjectCharset'] = $value; break; case 'body': $this->properties['body'] = $value; break; case 'messageId': case 'messageID': $this->properties['messageId'] = $value; break; case 'timestamp': throw new ezcBasePropertyPermissionException($name, ezcBasePropertyPermissionException::READ); break; case 'returnPath': $this->properties['returnPath'] = $value; break; default: parent::__set($name, $value); break; } }
/** * Sets the property $name to $value. * * @throws ezcBasePropertyNotFoundException * if the property does not exist. * @throws ezcBasePropertyPermissionException * if the property is read-only. * @param string $name * @param mixed $value * @ignore */ public function __set($name, $value) { switch ($name) { case 'charset': case 'subType': case 'encoding': case 'text': $this->properties[$name] = $value; break; case 'originalCharset': throw new ezcBasePropertyPermissionException($name, ezcBasePropertyPermissionException::READ); break; default: return parent::__set($name, $value); break; } }