本文整理匯總了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;
}