*
Sets the Sender, party that will be sending the money
@param String $name
@param String $email
@param String $areaCode
@param String $number
@param String $documentType
@param String $documentValue
189259
public function setSender(
        $name,
        $email = null,
        $areaCode = null,
        $number = null,
        $documentType = null,
        $documentValue = null
    ) {
        $param = $name;
        if (is_array($param)) {
            $this->sender = new PagSeguroSender($param);
        } elseif ($param instanceof PagSeguroSender) {
            $this->sender = $param;
        } else {
            $sender = new PagSeguroSender();
            $sender->setName($param);
            $sender->setEmail($email);
            $sender->setPhone(new PagSeguroPhone($areaCode, $number));
            $sender->addDocument($documentType, $documentValue);
            $this->sender = $sender;
        }
    }
1156397
protected function setRecipient($type, $email, $name)
    {
        $this->recipients[$type][$email] = compact('email', 'name');

        return $this;
    }
32158
public function setRecipientGatewayId($value)
    {
        if ($value === null || $value === '') {
            $this->_recipientGatewayId = null;
        } elseif (TypeCast::canCastToString($value)) {
            $this->_recipientGatewayId = (string)$value;
        } else {
            throw new InvalidPropertyValueTypeException(
                'Invalid recipientGatewayId value type in PaymentsRequest', 0, 'PaymentsRequest.recipientGatewayId',
                $value
            );
        }
    }
994017
public function setRecipientSignatureRejectionDocflow(\AgentSIB\Diadoc\Api\Proto\Docflow\RecipientSignatureRejectionDocflow $value = null)
    {
        $this->RecipientSignatureRejectionDocflow = $value;
    }
934117
public function setDocumentType(\Core\Entity\DocumentType $documentType = null) {
        $this->documentType = $documentType;

        return $this;
    }
1221624
public function setFrom($email, $name = null)
    {
        return parent::setFrom(
            $this->parseDomainPlaceholderAsPiwikHostName($email),
            $name
        );
    }
1086174
function setReceiver( $email, $name = false )
    {
        $this->Mail->to = array( new ezcMailAddress( $email, $name, $this->usedCharset() ) );
        $this->ReceiverElements = array( array( 'name' => $name,
                                                'email' => $email ) );
    }
792197
public function setDocument(\AgentSIB\Diadoc\Api\Proto\Docflow\DocumentWithDocflow $value)
    {
        $this->Document = $value;
    }
633255
function addCc( $email, $name = false )
    {
        $this->Mail->addCc( new ezcMailAddress( $email, $name, $this->usedCharset() ) );
        $this->CcElements[] = array( 'name' => $name,
                                     'email' => $email );
    }
1342289
public function add_bcc($email, $name = null) {
		if ($this->addressee_exists($email, ['bcc'])) {
			return;
		}

		$this->recipients['bcc'][] = [
			'name' => $name,
			'email' => strtolower($email),
		];
	}
905278
public function enableShardingForDbByDocumentName(string $documentName) : void
    {
        $dbName  = $this->dm->getDocumentDatabase($documentName)->getDatabaseName();
        $adminDb = $this->dm->getClient()->selectDatabase('admin');

        try {
            $adminDb->command(['enableSharding' => $dbName]);
        } catch (ServerException $e) {
            // Don't throw an exception if sharding is already enabled; there's just no other way to check this
            if ($e->getCode() !== self::CODE_SHARDING_ALREADY_INITIALIZED) {
                throw MongoDBException::failedToEnableSharding($dbName, $e->getMessage());
            }
        } catch (RuntimeException $e) {
            throw MongoDBException::failedToEnableSharding($dbName, $e->getMessage());
        }
    }
513378
public function addRecipient($name, $email, $amount) {
    $this->recipients->addRecipient($name, $email, $amount);
    return $this;
  }
1214156
public function add(string $email, string $name = null): void
    {
        $replyToRecipient = $this->make();
        $replyToRecipient->email = $email;
        if ($name !== null) {
            $replyToRecipient->name = $name;
        }
        $this->set($replyToRecipient);
    }
64481
public function setCustomProperty($propertyName,$propertyValue='',$propertyType=NULL) {
        if (($propertyType === NULL) || (!in_array($propertyType,array(self::PROPERTY_TYPE_INTEGER,
                                                                       self::PROPERTY_TYPE_FLOAT,
                                                                       self::PROPERTY_TYPE_STRING,
                                                                       self::PROPERTY_TYPE_DATE,
                                                                       self::PROPERTY_TYPE_BOOLEAN)))) {
            if ($propertyValue === NULL) {
                $propertyType = self::PROPERTY_TYPE_STRING;
            } elseif (is_float($propertyValue)) {
                $propertyType = self::PROPERTY_TYPE_FLOAT;
            } elseif(is_int($propertyValue)) {
                $propertyType = self::PROPERTY_TYPE_INTEGER;
            } elseif (is_bool($propertyValue)) {
                $propertyType = self::PROPERTY_TYPE_BOOLEAN;
            } else {
                $propertyType = self::PROPERTY_TYPE_STRING;
            }
        }

        $this->_customProperties[$propertyName] = array('value' => $propertyValue, 'type' => $propertyType);
        return $this;
    }
1326785
public function setEmail(string $email): void
	{
		if (!Validators::isEmail($email)) {
			throw new InvalidArgumentException('Value is not valid email');
		}

		/* @var $repository UsersRepository */
		$repository = $this->getRepository();
		$user = $repository->getByEmail($email);
		if ($user !== null && $user !== $this) {
			throw new UniqueConstraintViolationException("Email '$email' exists");
		}
		$this->email = $email;
	}
144554
function SetFrom($email,$name="")
	{
		if ($this->DecodeEntities)
		{
			$email = $this->DecodeEntities($email);
			$name = $this->DecodeEntities($name);
		}

		$this->From = new Recipient($email,$name);
	}
782376
public function set($key, $value)
    {
        if (!$value instanceof EmailBodyPart) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s only accepts instances of %s. Tried to to set key %s.',
                    __FUNCTION__, EmailBodyPart::class, $key
                )
            );
        }

        parent::set($key, $value);
    }