Sets the event handler when calling the "preSend" method.

@param callback|null $value The function to set.

@return void
199156
public function setPreSendHandler($value) {
        if ($value !== null && !is_callable($value)) {
            throw new \Exception('A function is expected, or null.');
        }

        $this->preSendHandler = $value;
    }
815073
public function set($value = null) 
    {
        if (is_null($value)) {
            $value = array();
        }
        
        if (!is_array($value)) {
            $value = func_get_args();
        }
        
        $this->__construct($value);
        
        return $this;
    }
843567
public static function event($value): void
    {
        if (false === self::message($value)) {
            throw new Exception\InvalidEvent($value);
        }
    }
293175
def handler(value)
      if value.zero?
        @up_callback.call if @up_callback
      else
        @last_press = Time.now
        @down_callback.call if @down_callback
      end

      if value.zero? && (Time.now - @last_press) > @hold_time
        @hold_callback.call if @hold_callback
      end
    end
757941
public function setRawValue( $value )
	{
		if ( is_null( $value ) )
			$this->_value = CoreFuncs::$False;
		else
			$this->_value = $value;

		$this->_xmlType = null;
	}
1278287
public function setTitle($value)
    {
        $this->_validateNotNull('Title', $value);
        $this->_validateString('Title', $value);

        if ($this->data['title'] === $value) {
            return;
        }

        $this->data['title'] = $value;

        $this->_setModified('title');
    }
601745
public function setValue($value)
	{
		if ( $value == $this->getValue() ) {
			return;
		}

		$this->_values['value'] = (string) $value;

		$this->setModified();
	}
344430
public function setValue($value)
    {
        $cast_method = 'castTo' . ucwords($this->castTo);
        $this->values[] = $this->{$cast_method}($value);
    }
1045912
protected function _initValue($value = null, $type = self::T_TEXT)
    {
        switch ($type) {
            case self::T_TEXT:
                $this->rawValue = $value;
                break;
            case self::T_RAW:
                $this->value = $value;
                break;
        }
    }
98894
protected function onSetFormValue(string $value): void
    {
        foreach ($this->radioButtons as $radioButton) {
            $isMatch = ($value === $radioButton->getValue());
            $radioButton->setSelected($isMatch);

            if ($isMatch) {
                $this->value = $value;
            }
        }

        parent::onSetFormValue($value);
    }
473056
public function setAfterIndexKey($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->AfterIndexKey = $value;
    }
1189390
public function lead($value = null, $currency = null, $contentName = null, $contentCategory = null)
    {
        $this->sendEventToOutput(
            self::EVENT_LEAD,
            $this->prepareProductsToParameters(
                null,
                $contentName,
                $contentCategory,
                $value,
                $currency,
                null,
                null
            )
        );
    }
473616
protected function onSetFormValue(string $value): void
    {
        $value = $this->sanitizeText($value);
        $this->onFormatText($value);
        $this->text = $value;

        parent::onSetFormValue($value);

        $this->onSetText($value);
    }
633259
public function setValue($value)
    {
        $this->value = [];

        $token = ' ,;';
        $values = strtok($value, $token);

        while ($values !== false) {
            $this->value[] = $values;
            $values = strtok($token);
        }
    }
880422
public function setValue($value)
    {
        if (is_array($value)) {
            $value = implode(', ', $value);
        }

        if (!is_null($value)) {
            $this->_value = $value;
            $this->appendChild($value);
        }
    }
514226
function setValue( $value )
    {
        $this->Value = $value;
        if ( $value instanceof ggWebservicesFault || $value instanceof eZSOAPFault )
        {
            $this->IsFault = true;
            $this->FaultCode = $value->faultCode();
            $this->FaultString = $value->faultString();
        }
        else
        {
            $this->IsFault = false;
        }
    }
93970
public function setSignerCertificate($value = null)
    {
        if ($value !== null && ! $value instanceof \Protobuf\Stream) {
            $value = \Protobuf\Stream::wrap($value);
        }

        $this->SignerCertificate = $value;
    }