当前位置: 首页>>代码示例>>PHP>>正文


PHP Message::__construct方法代码示例

本文整理汇总了PHP中Message::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Message::__construct方法的具体用法?PHP Message::__construct怎么用?PHP Message::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Message的用法示例。


在下文中一共展示了Message::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor for SAML 2 response messages.
  *
  * @param string          $tagName The tag name of the root element.
  * @param \DOMElement|null $xml     The input message.
  * @throws \Exception
  */
 protected function __construct($tagName, \DOMElement $xml = null)
 {
     parent::__construct($tagName, $xml);
     $this->status = array('Code' => Constants::STATUS_SUCCESS, 'SubCode' => null, 'Message' => null);
     if ($xml === null) {
         return;
     }
     if ($xml->hasAttribute('InResponseTo')) {
         $this->inResponseTo = $xml->getAttribute('InResponseTo');
     }
     $status = Utils::xpQuery($xml, './saml_protocol:Status');
     if (empty($status)) {
         throw new \Exception('Missing status code on response.');
     }
     $status = $status[0];
     $statusCode = Utils::xpQuery($status, './saml_protocol:StatusCode');
     if (empty($statusCode)) {
         throw new \Exception('Missing status code in status element.');
     }
     $statusCode = $statusCode[0];
     $this->status['Code'] = $statusCode->getAttribute('Value');
     $subCode = Utils::xpQuery($statusCode, './saml_protocol:StatusCode');
     if (!empty($subCode)) {
         $this->status['SubCode'] = $subCode[0]->getAttribute('Value');
     }
     $message = Utils::xpQuery($status, './saml_protocol:StatusMessage');
     if (!empty($message)) {
         $this->status['Message'] = trim($message[0]->textContent);
     }
 }
开发者ID:SysBind,项目名称:saml2,代码行数:37,代码来源:StatusResponse.php

示例2: __construct

 /**
  * MessageEcho constructor.
  *
  * @param bool $isEcho
  * @param int $appId
  * @param string $id
  * @param int $sequence
  * @param null|string $metadata
  * @param null|string $text
  * @param array $attachments
  */
 public function __construct($isEcho, $appId, $id, $sequence, $metadata = null, $text = null, array $attachments = [])
 {
     parent::__construct($id, $sequence, $text, $attachments);
     $this->isEcho = $isEcho;
     $this->appId = $appId;
     $this->metadata = $metadata;
 }
开发者ID:tgallice,项目名称:fb-messenger-sdk,代码行数:18,代码来源:MessageEcho.php

示例3: __construct

 /**
  * ReplyToMessage constructor.
  *
  * @param array  $data
  * @param string $bot_name
  *
  * @throws \Longman\TelegramBot\Exception\TelegramException
  */
 public function __construct(array $data, $bot_name = '')
 {
     //As explained in the documentation
     //Reply to message can't contain other reply to message entities
     unset($data['reply_to_message']);
     parent::__construct($data, $bot_name);
 }
开发者ID:akalongman,项目名称:php-telegram-bot,代码行数:15,代码来源:ReplyToMessage.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->BindSetting(Protocl::$byteOrder, Moudle::$Auth);
     $this->code = 0;
     $this->city = "Beijing";
 }
开发者ID:49038554,项目名称:Buddy,代码行数:7,代码来源:UserRegister.php

示例5: __construct

 public function __construct($status = 200, array $headers = array(), Stream $body, $protocol = '1.1', $reason = null)
 {
     parent::__construct($headers, $body, $protocol);
     $this->statuses = array(100 => 'Continue', 101 => 'Switching Protocols', 102 => 'Processing', 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authorative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', 207 => 'Multi-Status', 208 => 'Already Reported', 226 => 'IM Used', 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 306 => 'Switch Proxy', 307 => 'Temporary Redirect', 308 => 'Permanent Redirect', 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Timeout', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Long', 415 => 'Unsupported Media Type', 416 => 'Request Range Not Satisfied', 417 => 'Expectation Failed', 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout');
     $this->status = $status;
     $this->reasonPhrase = $reason;
 }
开发者ID:rosengate,项目名称:exedra,代码行数:7,代码来源:Response.php

示例6: __construct

 /**
  * Create a new SMS text message.
  *
  * @param string $to
  * @param string $from
  * @param string $title
  * @param string $url
  * @param int $validity
  */
 public function __construct($to, $from, $title, $url, $validity)
 {
     parent::__construct($to, $from);
     $this->title = (string) $title;
     $this->url = (string) $url;
     $this->validity = (int) $validity;
 }
开发者ID:dpodium,项目名称:yii2-nexmo,代码行数:16,代码来源:Wap.php

示例7:

 function __construct($requestId, $options, $topicName)
 {
     parent::__construct();
     $this->options = $options;
     $this->topicName = $topicName;
     $this->setRequestId($requestId);
 }
开发者ID:duanejeffers,项目名称:Thruway,代码行数:7,代码来源:SubscribeMessage.php

示例8: __construct

 public function __construct($data, $connection)
 {
     parent::__construct($data, $connection);
     $cache = \Cache::get($connection->session);
     $this->message = strip_tags($data->message);
     $this->nickname = $cache['nickname'];
 }
开发者ID:beingsane,项目名称:SeminarioLocaweb,代码行数:7,代码来源:ChatMessage.php

示例9: __construct

 /**
  * @param ConnectionInterface $connection
  * @param int $format notification format, defaults to 2
  * @throws CException
  */
 public function __construct(ConnectionInterface &$connection, $format = self::FORMAT_DEFAULT)
 {
     parent::__construct($connection);
     if (!in_array($format, [self::FORMAT_SIMPLE, self::FORMAT_ENHANCED, self::FORMAT_DEFAULT])) {
         throw new CException('Unknown message format.');
     }
     $this->_format = $format;
 }
开发者ID:chervand,项目名称:yii-push,代码行数:13,代码来源:APNSMessage.php

示例10: __construct

 public function __construct()
 {
     $this->notify_id = 0;
     $this->notify_type = -1;
     $this->payload = '';
     $this->restricted_package_name = Constants::$packageName;
     parent::__construct();
 }
开发者ID:fpfgithub,项目名称:xmpush,代码行数:8,代码来源:Builder.php

示例11: __construct

 public function __construct(array $params, $toUser)
 {
     #-------------------------------------------------------------------------------
     parent::__construct('DomainOrdersOnRegister', $toUser);
     #-------------------------------------------------------------------------------
     $this->setParams($params);
     #-------------------------------------------------------------------------------
 }
开发者ID:carriercomm,项目名称:jbs,代码行数:8,代码来源:DomainOrdersOnRegisterMsg.class.php

示例12: __construct

 /**
  * Creates a new guestbook comment object.
  * 
  * @param	integer		$commentID
  * @param	array		$row
  */
 public function __construct($entryID, $row = null)
 {
     if ($entryID !== null) {
         $sql = "SELECT\t\tcomment.*\n\t\t\t\tFROM\t\twcf" . WCF_N . "_user_guestbook_comment comment\n\t\t\t\tWHERE\t\tcomment.commentID = " . $commentID;
         $row = WCF::getDB()->getFirstRow($sql);
     }
     parent::__construct($row);
 }
开发者ID:0xLeon,项目名称:com.leon.wcf.user.guestbook,代码行数:14,代码来源:UserGuestbookComment.class.php

示例13: __construct

 public function __construct($id = 0)
 {
     parent::__construct();
     if ($id) {
         if (!$this->charger_id($id)) {
             throw new TheliaAdminException("Message not found", TheliaAdminException::MESSAGE_NOT_FOUND);
         }
     }
 }
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:9,代码来源:MessageAdmin.class.php

示例14: __construct

 /**
  * Creates a new guestbook entry object.
  * 
  * @param	integer		$entryID
  * @param	array		$row
  */
 public function __construct($entryID, $row = null)
 {
     if ($entryID !== null) {
         $sql = "SELECT\t\tentry.*,\n\t\t\t\t\t\tCOUNT(comment.commentID) AS commentCount,\n\t\t\t\t\t\tGROUP_CONCAT(comment.commentID ORDER BY comment.commentID ASC SEPARATOR ',') AS commentIDs\n\t\t\t\tFROM\t\twcf" . WCF_N . "_user_guestbook_entry entry\n\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_user_guestbook_comment comment\n\t\t\t\tON\t\t(entry.entryID = comment.entryID)\n\t\t\t\tWHERE\t\tentry.entryID = " . $entryID;
         $row = WCF::getDB()->getFirstRow($sql);
     }
     $this->commentList = new UserGuestbookCommentList();
     parent::__construct($row);
 }
开发者ID:0xLeon,项目名称:com.leon.wcf.user.guestbook,代码行数:15,代码来源:UserGuestbookEntry.class.php

示例15: __construct

 /**
  * Constructor
  *
  * @param int $requestId
  * @param mixed $options
  * @param string $topicName
  * @param mixed $arguments
  * @param mixed $argumentsKw
  */
 public function __construct($requestId, $options, $topicName, $arguments = null, $argumentsKw = null)
 {
     parent::__construct();
     $this->setRequestId($requestId);
     $this->setArguments($arguments);
     $this->setArgumentsKw($argumentsKw);
     $this->setOptions($options);
     $this->topicName = $topicName;
 }
开发者ID:pacho104,项目名称:redbpim,代码行数:18,代码来源:PublishMessage.php


注:本文中的Message::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。