Exemplo n.º 1
0
 public function __construct(AccessToken $accessToken, $config)
 {
     parent::setAccessToken($accessToken);
     $this->config = $config;
     $this->deviceType = $this->config['device_type'];
     $this->productId = $this->config['product_id'];
 }
Exemplo n.º 2
0
 /**
  * Notice constructor.
  *
  * @param \EasyWeChat\Core\AccessToken $accessToken
  */
 public function __construct(AccessToken $accessToken)
 {
     parent::__construct($accessToken);
     $this->messageBackup = $this->message;
 }
Exemplo n.º 3
0
 /**
  * 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;
 }