本文整理汇总了PHP中Service::send方法的典型用法代码示例。如果您正苦于以下问题:PHP Service::send方法的具体用法?PHP Service::send怎么用?PHP Service::send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service
的用法示例。
在下文中一共展示了Service::send方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: method
public function method()
{
if (!empty($this->_params['token'])) {
$service = new Service();
return $service->send($this->_params['token'], $this->_params['wecha_id'], $this->_params['content']);
}
}
示例2: send
/**
* Send the estimate
* @param Service $service
* @param string $method Send method (email|hand|post); default: email
* @param type $email Address to send to; default: contact e-mail
* @param type $message
* @return self
*/
public function send(Service $service, $method = 'email', $email = null, $message = null)
{
return $this->reload($service->send($this, $method, $email, $message));
}
示例3: send
/**
* Send email.
*
* @param array $email
*/
private function send($email)
{
$this->logger->info('NewAccountCreatedListener send()');
$message = \Swift_Message::newInstance()->setSubject($email['subject'])->setFrom(array($this->fromEmailAddress => $this->fromName))->setTo($email['emailAddress'])->setBody($email['bodyHTML'], 'text/html')->addPart($email['bodyTEXT'], 'text/plain');
$this->mailer->send($message);
}
示例4: set
/**
* Set the tool settings.
*
* @param array $settings An associative array of settings (optional, default is null)
*
* @return HTTPMessage HTTP object containing request and response details
*/
public function set($settings)
{
if (!$this->simple) {
if (is_a($this->source, 'ToolConsumer')) {
$type = 'ToolProxy';
} else {
if (is_a($this->source, 'ToolConsumer')) {
$type = 'ToolProxyBinding';
} else {
$type = 'LtiLink';
}
}
$obj = new \stdClass();
$obj->{'@context'} = 'http://purl.imsglobal.org/ctx/lti/v2/ToolSettings';
$obj->{'@graph'} = array();
$level = new \stdClass();
$level->{'@type'} = $type;
$level->{'@id'} = $this->endpoint;
$level->{'custom'} = $settings;
$obj->{'@graph'}[] = $level;
$body = json_encode($obj);
} else {
$body = json_encode($settings);
}
$response = parent::send('PUT', null, $body);
return $response->ok;
}