Horde_ActiveSync_Rfc822::__construct PHP Method

__construct() public method

Constructor.
public __construct ( mixed $rfc822, boolean $auto_add_headers = true )
$rfc822 mixed The incoming message. Either a string or a stream resource.
$auto_add_headers boolean Automatically add the standard Message-ID and User-Agent headers? @since 2.14.0
    public function __construct($rfc822, $auto_add_headers = true)
    {
        if (is_resource($rfc822)) {
            $stream = new Horde_Stream_Existing(array('stream' => $rfc822));
            $stream->rewind();
        } else {
            $stream = new Horde_Stream_Temp(array('max_memory' => self::$memoryLimit));
            $stream->add($rfc822, true);
        }
        $this->_parseStream($stream);
        if ($auto_add_headers) {
            $this->addStandardHeaders();
        }
    }