Retrieves the message content type

@link http://tools.ietf.org/html/rfc2616#section-14.17

@return string The content type
484501
public function getContentType()
    {
        if (empty($this->_content_type) && $this->_headers->has('Content-Type'))
        {
            $type = $this->_headers->get('Content-Type');

            //Strip parameters from content-type like "; charset=UTF-8"
            if (is_string($type))
            {
                if (preg_match('/^([^,\;]*)/', $type, $matches)) {
                    $type = $matches[1];
                }
            }

            $this->_content_type = $type;
        }

        return $this->_content_type;
    }
505399
public function getHeaderContent()
    {
        $headerContent = '';
        $sender = $this->getSender();
        if (!empty($sender)) {
            $headerContent .= 'From: ' . $sender . PHP_EOL;
        }
        $reply = $this->getReply();
        if (!empty($reply)) {
            $headerContent .= 'Reply-to: ' . $reply . PHP_EOL;
        }
        $recipientCc = $this->getRecipientCc();
        if (!empty($recipientCc)) {
            $headerContent .= 'Cc: ' . $recipientCc . PHP_EOL;
        }
        $recipientBcc = $this->getRecipientBcc();
        if (!empty($recipientBcc)) {
            $headerContent .= 'Bcc: ' . $recipientBcc . PHP_EOL;
        }
        if (!empty($this->mailer)) {
            $headerContent .= 'X-Mailer: ' . $this->mailer . PHP_EOL;
        }
        $headerContent .= 'MIME-Version: 1.0' . PHP_EOL;
        if (!empty($this->attachmentList)) {
            $contentType = 'multipart/mixed';
        } else {
            $contentType = 'multipart/alternative';
        }
        $headerContent .= 'Content-Type: ' . $contentType . '; boundary="' . $this->boundary . '"';
        $headerContent .= PHP_EOL . PHP_EOL;
        return $headerContent;
    }
768232
public function getContentTypeService()
    {
        if (null === $this->contentTypeService) {
            $this->contentTypeService = new ContentTypeService(
                $this->client,
                $this->inputDispatcher,
                $this->outputVisitor,
                $this->requestParser
            );
        }

        return $this->contentTypeService;
    }
1270572
function getContentType()
    {
        $formatExtension = $this->getFormatExtension();

        return isset($this->environment->contentTypes[$formatExtension])
            ? $this->environment->contentTypes[$formatExtension]
            : false;
    }
217994
public function getContent()
    {
        $content = $this->getRawContent();
        $content = apply_filters('the_content', $content);
        $content = str_replace( ']]>', ']]&gt;', $content);

        return $content;
    }
569334
public function getMessageType() {
    // 
    $messageType = static::types()[$this->type];
    // If not incoming
    if ($this->type != static::INCOMING) {
      // Change to uppercase
      $messageType = strtoupper($messageType);
    }
    // Return
    return $messageType;
  }
1368102
public function  getContentLanguage() {
        if (!isset($this->metadata[OSSHeaders::CONTENT_LANGUAGE])) {
            return null;
        }
        return $this->metadata[OSSHeaders::CONTENT_LANGUAGE];
    }
810349
protected function fileType() {

		$type = '';

		if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $this->post->ID ), $matches ) ) {

			$type = $matches[1];
		}

		return $type ? esc_html( strtoupper( $type ) ) : '';
	}
370859
protected function contentHeaders()
    {
        $this->checkParams();

        $eol = $this->build_params['eol'] ?: "\r\n";

        // multipart message: and boundary
        if (!empty($this->build_params['boundary'])) {
            $boundary = $this->build_params['boundary'];
        }
        else if (!empty($this->headers['Content-Type'])
            && preg_match('/boundary="([^"]+)"/', $this->headers['Content-Type'], $m)
        ) {
            $boundary = $m[1];
        }
        else {
            $boundary = '=_' . md5(rand() . microtime());
        }

        $this->build_params['boundary'] = $boundary;

        if ($this->type == self::PGP_SIGNED) {
            $headers['Content-Type'] = "multipart/signed;$eol"
                ." protocol=\"application/pgp-signature\";$eol"
                ." boundary=\"$boundary\"";

            if ($this->micalg) {
                $headers['Content-Type'] .= ";{$eol} micalg=pgp-" . $this->micalg;
            }
        }
        else if ($this->type == self::PGP_ENCRYPTED) {
            $headers['Content-Type'] = "multipart/encrypted;$eol"
                ." protocol=\"application/pgp-encrypted\";$eol"
                ." boundary=\"$boundary\"";
        }

        return $headers;
    }
1271161
public function getMsgAlternativeBody()
    {
        if (
            !empty($this->_parts)
            && (
                $this->getHeaders()->getMessageContentType() == Content::CT_MULTIPART_ALTERNATIVE
                || $this->getHeaders()->getMessageContentType() == Content::CT_MULTIPART_MIXED
            )
        ) {
            foreach ($this->_parts as $part) {
                if ($part->contentType == Content::CT_TEXT_PLAIN) {
                    return $part->getContentDecode();
                }
            }
        }

        return null;
    }
649421
public function getMessageTypes()
    {
        if ($this->messageTypes === null) {
            $this->messageTypes = array();
            $messageTypes = Mage::getConfig()->getNode(self::XML_PATH_MESSAGE_TYPES);
            if ($messageTypes) {
                foreach ($messageTypes->children() as $typeCode => $classAlias) {
                    $this->messageTypes[$typeCode] = (string)$classAlias;
                }
            }
        }

        return $this->messageTypes;
    }
1185693
protected function getSectionTextHtml()
    {
        if ($this->_text_encoding == 'quoted-printable') {
            return EmailHelper::qpContentTransferEncode($this->_text_html)."\r\n";
        } elseif ($this->_text_encoding == 'base64') {
            // don't add CRLF if using base64 - spam filters don't
            // like this
            return EmailHelper::base64ContentTransferEncode($this->_text_html);
        }
        return $this->_text_html."\r\n";
    }
1079004
public function getGroupedHtml()
    {
        $name = $this->getNameInLayout();
        $htmlId = uniqid($name);

        $types = [];
        foreach ($this->_usedStorageTypes as $type) {
            $type = $this->getVarnishMessageModel()->getMessageTypeByStorage($type);
            if (!$type) {
                continue;
            }
            $types[] = $type;
        }

        return sprintf(
            $this->getMessageContainerFormat(),
            json_encode($htmlId),
            json_encode($this->getUrl('varnish/ajax/message', array(
                '_secure' => Mage::app()->getStore()->isCurrentlySecure()
            ))),
            json_encode($types),
            json_encode(EcomDev_Varnish_Model_Message::COOKIE_NAME),
            json_encode(array(
                'path' => Mage::getSingleton('core/cookie')->getPath(),
                'domain' => Mage::getSingleton('core/cookie')->getDomain()
            ))
        );
    }
1374635
public function getContent()
    {
        $content = '';

        if ($this->_size > 0) {
            $content .= '\fs' . ($this->_size * 2) . ' ';
        }

        if ($this->_fontFamily && $this->_fontTable) {
            $fontIndex = $this->_fontTable->getFontIndex($this->_fontFamily);
            if ($fontIndex !== false) {
                $content .= '\f' . $fontIndex . ' ';
            }
        }

        if ($this->_color && $this->_colorTable) {
            $colorIndex = $this->_colorTable->getColorIndex($this->_color);
            if ($colorIndex !== false) {
                $content .= '\cf' . $colorIndex . ' ';
            }
        }

        if ($this->_backgroundColor && $this->_colorTable) {
            $colorIndex = $this->_colorTable->getColorIndex($this->_backgroundColor);
            if ($colorIndex !== false) {
                $content .= '\chcbpat' . $colorIndex . ' ';
            }
        }

        if ($this->_isBold) {
            $content .= '\b ';
        }
        if ($this->_isItalic) {
            $content .= '\i ';
        }
        if ($this->_isUnderlined) {
            $content .= '\ul ';
        }
        if ($this->_animation) {
            $content .= '\animtext' . $this->_animation;
        }
        if ($this->_isStriked) {
            $content .= '\strike ' . $this->_animation;
        }
        elseif ($this->_isDoubleStriked) {
            $content .= '\striked1 ' . $this->_animation;
        }

        return $content;
    }
284506
public function getMessageFormat() {
		$message = ['msg_type' => $this->msg_type];
		switch($this->msg_type) {
			case 'text':
				$message['content'] = $this->content;
				break;
			case 'video':
				$message['title'] = $this->title;
				$message['description'] = $this->description;
			case 'image':
			case 'voice':
				$message['media_id'] = $this->materialMedia->media_id;
				$message['media_url'] = $this->materialMedia->material->url;
				break;
			case 'music':
				$message['title'] = $this->title;
				$message['description'] = $this->description;
				$message['music_url'] = $this->music_url;
				$message['hq_music_url'] = $this->hq_music_url;
				$message['thumb_media_id'] = $this->thumbMaterialMedia->media_id;
				$message['thumb_media_url'] = $this->thumbMaterialMedia->material->url;
				break;
			case 'news':
				$pic_urls = $this->newsMedia->thumbUrlList;
				$urls = $this->newsMedia->urlList;
				$articles = [];
				foreach($this->newsMedia->news->items as $index => $item) {
					if(!isset($pic_urls[$index]) || !isset($urls[$index])) {
						break;
					}
					$articles[] = [
						'title' => $item->title,
						'description' => $item->digest,
						'pic_url' => $pic_urls[$index],
						'url' => $urls[$index],
					];
				}
				$message['articles'] = Json::encode($articles);
				break;
			default:
				return [];
				break;
		}

		return $message;
	}
826985
public function getContent()
    {
        return $this->getCachedProperty(
            'content',
            function () {
                $type = $this->getType();
                if ('text' === $type || 'html' === $type) {
                    return $this->getDomElement()->textContent;
                } elseif ('xhtml' === $type) {
                    /** @var \DOMElement $xhtml */
                    $xhtml = $this->query('xhtml:div', Node::SINGLE | Node::REQUIRED);

                    return Xhtml::extract($xhtml);
                } elseif ($this->isXmlMimeType($type)) {
                    /** @var \DOMElement $xml */
                    $xml = $this->query('*', Node::SINGLE | Node::REQUIRED);

                    return $this->getDomElement()->ownerDocument->saveXML($xml);
                } elseif (stripos($type, 'text/') === 0) {
                    return $this->getDomElement()->textContent;
                }

                return base64_decode($this->getDomElement()->textContent);
            }
        );
    }
219039
public String getContentType() {
        String[] values = getMimeHeader("Content-Type");
        if (values != null && values.length > 0)
            return values[0];
        return null;
    }