Differential D21678 Diff 51616 src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/parser/PhabricatorMetaMTAEmailBodyParser.php
<?php | <?php | ||||
final class PhabricatorMetaMTAEmailBodyParser extends Phobject { | final class PhabricatorMetaMTAEmailBodyParser extends Phobject { | ||||
/** | /** | ||||
* Mails can have bodies such as | * Mails can have bodies such as | ||||
* | * | ||||
* !claim | * !claim | ||||
* | * | ||||
* taking this task | * taking this task | ||||
* | * | ||||
* Or | * Or | ||||
* | * | ||||
* !assign epriestley | * !assign alincoln | ||||
* | * | ||||
* please, take this task I took; its hard | * please, take this task I took; its hard | ||||
* | * | ||||
* This function parses such an email body and returns a dictionary | * This function parses such an email body and returns a dictionary | ||||
* containing a clean body text (e.g. "taking this task"), and a list of | * containing a clean body text (e.g. "taking this task"), and a list of | ||||
* commands. For example, this body above might parse as: | * commands. For example, this body above might parse as: | ||||
* | * | ||||
* array( | * array( | ||||
* 'body' => 'please, take this task I took; its hard', | * 'body' => 'please, take this task I took; it's hard', | ||||
cspeckmim: :) | |||||
* 'commands' => array( | * 'commands' => array( | ||||
* array('assign', 'epriestley'), | * array('assign', 'alincoln'), | ||||
* ), | * ), | ||||
* ) | * ) | ||||
* | * | ||||
* @param string Raw mail text body. | * @param string Raw mail text body. | ||||
* @return dict Parsed body. | * @return dict Parsed body. | ||||
*/ | */ | ||||
public function parseBody($body) { | public function parseBody($body) { | ||||
$body = $this->stripTextBody($body); | $body = $this->stripTextBody($body); | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |
:)