コード例 #1
0
ファイル: Device.php プロジェクト: easywechat/device
 public function __construct(AccessToken $accessToken, $config)
 {
     parent::setAccessToken($accessToken);
     $this->config = $config;
     $this->deviceType = $this->config['device_type'];
     $this->productId = $this->config['product_id'];
 }
コード例 #2
0
ファイル: Notice.php プロジェクト: yuyebin/wechat-sdk
 /**
  * Notice constructor.
  *
  * @param \EasyWeChat\Core\AccessToken $accessToken
  */
 public function __construct(AccessToken $accessToken)
 {
     parent::__construct($accessToken);
     $this->messageBackup = $this->message;
 }
コード例 #3
0
ファイル: Material.php プロジェクト: Rongx/demo_wechat
 /**
  * Get API by type.
  *
  * @param string $type
  *
  * @return string
  */
 public function getAPIByType($type)
 {
     switch ($type) {
         case 'news_image':
             $api = parent::getAPI(self::API_NEWS_IMAGE_UPLOAD);
             break;
         default:
             $api = parent::getAPI(self::API_UPLOAD);
     }
     return $api;
 }