Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.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.