Return a formatted subject line for replies.

@param string $subject The subject string
@return string The formatted reply subject
171459
private function get_reply_subject($subject) {
        $prefix = get_string('replysubjectprefix', 'tool_messageinbound');
        if (!(substr($subject, 0, strlen($prefix)) == $prefix)) {
            $subject = $prefix . ' ' . $subject;
        }

        return $subject;
    }
1084294
public function email($email, $subject = null, $body = null) {
	    $email = 'mailto:'.$email;
	    if (!is_null($subject) || !is_null($body)) {
	        $email .= '?'.http_build_query(compact('subject', 'body'));
        }
	    return $this->encode($email);
    }
1097108
protected function supportSubject($subject)
    {
        if (is_object($subject)) {
            return $this->supportClasses(
                $subject,
                array('OpenOrchestra\ModelInterface\Model\ContentInterface')
            );
        }

        return $subject === ContentInterface::ENTITY_TYPE;
    }
192483
public function subject($subject) {

		if(false === is_string($subject)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($subject)), E_USER_ERROR);
		}

		$this -> subject = $subject;

		return $this;
	}
1000077
protected function response($response)
    {

        if (empty($response)) {
            return "";
        }

        is_string($response) && $response = Message::make('text')->with('content', $response);

        $return = "";

        if ($response instanceof BaseMessage) {
            $response->from($this->input->get('ToUserName'))->to($this->input->get('FromUserName'));

            $this->call('responseCreated', array($response));

            $return = $response->buildForReply();

            $return = $this->getCrypt()->encryptMsg(
                $return,
                $this->input->get('nonce'),
                $this->input->get('timestamp')
            );
        }

        $return = $this->call('served', array($return), $return);

        return $return;
    }
419717
protected function supportSubject($subject)
    {
        if (is_object($subject)) {
            return $this->supportClasses(
                $subject,
                array(
                    'OpenOrchestra\ModelInterface\Model\ContentTypeInterface',
                    'OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface',
                    'OpenOrchestra\ModelInterface\Model\StatusInterface'
                )
            );
        }

        return in_array(
            $subject,
            array(
                ContentTypeInterface::ENTITY_TYPE,
                WorkflowProfileInterface::ENTITY_TYPE,
                StatusInterface::ENTITY_TYPE
            )
        );
    }
1275085
public function receiveAnEmailWithSubject($subject)
    {
        $message = $this->fetchLastMessage();
        $this->assertEquals($subject, $message->subject);
    }
337320
public function setSubject($subject)
    {
        if ($subject === '') {
            throw new \InvalidArgumentException('$subject must not be empty.', 1331488802);
        }

        if ((strpos($subject, CR) !== false) || (strpos($subject, LF) !== false)) {
            throw new \InvalidArgumentException(
                '$subject must not contain any line breaks or carriage returns.',
                1331488817
            );
        }

        $this->setAsString('subject', $subject);
    }
1204369
public function subject($subject)
	{
		if ($this->config['encode_headers'])
		{
			$subject = $this->encode_mimeheader((string) $subject);
		}
		$this->subject = (string) $subject;

		return $this;
	}
1372877
public static function getPlainMail($to, $from, $body, $subject) {
        $mail = new MailMessage($to, $from, $body, $subject);
        return $mail;
    }
532524
function subject( $convert = true )
    {
//        return $this->Mail->subject;
        if ( !$convert )
            return $this->Subject;
        return $this->convertHeaderText( $this->Subject );
    }
593182
public static function ToSnakeCase ($subject, $trim = true) {
		$subject = Regex::ReplaceCallback(
			"/([A-Z])/",
			function ($matches) {return '_'. strtolower($matches[1]);},
			$subject
		);
		return ($trim) ? ltrim($subject, '_') : $subject;
	}
439493
public function ascii($subject) : bool
    {
        if ($subject === null) {
            return false;
        }
        $v = '' . $subject;
        return $v === '' ? true : !!preg_match('/^[[:ascii:]]+$/', $v);
    }
388317
public function decorate($subject)
    {
        foreach ($subject as $key => $atom) {
            $subject[$key] = $this->autoPresenter->decorate($atom);
        }

        return $subject;
    }
739447
public function openSubjectAction(Subject $subject)
    {
        $forum = $subject->getCategory()->getForum();
        $this->checkAccess($forum);
        $this->manager->openSubject($subject);

        return new RedirectResponse(
            $this->generateUrl('claro_forum_subjects', array('category' => $subject->getCategory()->getId()))
        );
    }
222267
public static function replaceString($from, $to, $subject, $limit = 100000)
    {
        $from = '/' . preg_quote($from, '/') . '/';
        return preg_replace($from, $to, $subject, $limit);
    }
1342287
public function stickSubjectAction(Subject $subject)
    {
        $forum = $subject->getCategory()->getForum();
        $this->checkAccess($forum);
        $this->manager->stickSubject($subject);

        return new RedirectResponse(
            $this->generateUrl('claro_forum_subjects', array('category' => $subject->getCategory()->getId()))
        );
    }