Skip to content

Commit 6aa44d0

Browse files
committed
Missing message setter methods added
1 parent 4b5f38a commit 6aa44d0

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed

src/Message.php

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,4 +1028,84 @@ public function mask($mask = null){
10281028

10291029
throw new MaskNotFoundException("Unknown mask provided: ".$mask);
10301030
}
1031+
1032+
/**
1033+
* Set the message path aka folder path
1034+
* @param $folder_path
1035+
*
1036+
* @return $this
1037+
*/
1038+
public function setFolderPath($folder_path){
1039+
$this->folder_path = $folder_path;
1040+
1041+
return $this;
1042+
}
1043+
1044+
/**
1045+
* Set the config
1046+
* @param $config
1047+
*
1048+
* @return $this
1049+
*/
1050+
public function setConfig($config){
1051+
$this->config = $config;
1052+
1053+
return $this;
1054+
}
1055+
1056+
/**
1057+
* Set the attachment collection
1058+
* @param $attachments
1059+
*
1060+
* @return $this
1061+
*/
1062+
public function setAttachments($attachments){
1063+
$this->attachments = $attachments;
1064+
1065+
return $this;
1066+
}
1067+
1068+
/**
1069+
* Set the flag collection
1070+
* @param $flags
1071+
*
1072+
* @return $this
1073+
*/
1074+
public function setFlags($flags){
1075+
$this->flags = $flags;
1076+
1077+
return $this;
1078+
}
1079+
1080+
/**
1081+
* Set the client
1082+
* @param $client
1083+
*
1084+
* @throws Exceptions\ConnectionFailedException
1085+
* @return $this
1086+
*/
1087+
public function setClient($client){
1088+
$this->client = $client;
1089+
$this->client->openFolder($this->folder_path);
1090+
1091+
return $this;
1092+
}
1093+
1094+
/**
1095+
* Set the message number
1096+
* @param $msgn
1097+
* @param null $msglist
1098+
*
1099+
* @throws Exceptions\ConnectionFailedException
1100+
* @throws Exceptions\RuntimeException
1101+
* @return $this
1102+
*/
1103+
public function setMsgn($msgn, $msglist = null){
1104+
$this->msgn = $msgn;
1105+
$this->msglist = $msglist;
1106+
1107+
$this->uid = $this->client->getConnection()->getUid($this->msgn);
1108+
1109+
return $this;
1110+
}
10311111
}

0 commit comments

Comments
 (0)