Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Copyright 2008-2017 Horde LLC (http://www.horde.org/) getBaseSubject() code adapted from imap-base-subject.c (Dovecot 1.2) Original code released under the LGPL-2.1 Copyright (c) 2002-2008 Timo Sirainen <tss@iki.fi>

Copyright: 2002-2008 Timo Sirainen
Copyright: 2008-2017 Horde LLC
License: http://www.horde.org/licenses/lgpl21 LGPL 2.1
File Size: 231 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Horde_Imap_Client_Data_BaseSubject:: (6 methods):
  __construct()
  __toString()
  _removeSubjLeader()
  _removeBlob()
  _removeBlobWhenNonempty()
  _removeSubjFwdHdr()


Class: Horde_Imap_Client_Data_BaseSubject  - X-Ref

Determines the "base subject" of a string (RFC 5256 [2.1]).

__construct($str, array $opts = array()   X-Ref
Constructor.

param: string $str  The subject string.
param: array $opts  Additional options:
return: string  The cleaned up subject string.

__toString()   X-Ref
Return the "base subject" defined in RFC 5256 [2.1].

return: string  The base subject.

_removeSubjLeader(&$str, $keepblob = false)   X-Ref
Remove all prefix text of the subject that matches the subj-leader
ABNF.

param: string &$str       The subject string.
param: boolean $keepblob  Remove blob information?
return: boolean  True if string was altered.

_removeBlob($str, $i)   X-Ref
Remove "[...]" text.

param: string $str  The subject string.
param: integer $i   Current position.
return: boolean|integer  False if blob was not found, otherwise the

_removeBlobWhenNonempty(&$str)   X-Ref
Remove "[...]" text if it doesn't result in the subject becoming
empty.

param: string &$str  The subject string.
return: boolean  True if string was altered.

_removeSubjFwdHdr(&$str)   X-Ref
Remove a "[fwd: ... ]" string.

param: string &$str  The subject string.
return: boolean  True if string was altered.