IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Callback
  • Code
  • Event
  • Factory
  • Push
  • WxApi

Class Push

CApplicationComponent
Extended by application\modules\message\core\wx\Push
Namespace: application\modules\message\core\wx
Copyright: 2008-2014 IBOS Inc
Author: banyanCheung banyan@ibos.com.cn
Located at system/modules/message/core/wx/Push.php

Methods summary

public boolean
# sendText( array $userIds, string $content, integer $appId, integer $safe = 0, array $toparty = array(), array $totag = array() )

推送文字格式的消息

推送文字格式的消息

Parameters

$userIds
推送的微信用户ID
$content
消息内容
$appId
应用ID
$safe
是否保密消息
$toparty
发送部门范围
$totag
发送标签范围

Returns

boolean
推送成功与否
public boolean
# sendNews( array $userIds, array $items, integer $appId, array $toparty = array(), array $totag = array() )

发送图文格式的消息

发送图文格式的消息

Parameters

$userIds
推送的微信用户ID
$items
图文消息内容项,格式详见 @see handleNewsItems
$appId
应用ID
$toparty
发送部门范围
$totag
发送标签范围

Returns

boolean
推送成功与否
public boolean
# sendVideo( array $userIds, string $medidaId, integer $appId, integer $safe = 0, array $toparty = array(), array $totag = array() )

发送图文格式的消息

发送图文格式的消息

Parameters

$userIds
推送的微信用户ID
$medidaId
微信媒体资源ID
$appId
应用ID
$safe
是否保密消息
$toparty
发送部门范围
$totag
发送标签范围

Returns

boolean
推送成功与否
public boolean
# sendVoice( array $userIds, string $medidaId, integer $appId, integer $safe = 0, array $toparty = array(), array $totag = array() )

发送音频格式的消息

发送音频格式的消息

Parameters

$userIds
推送的微信用户ID
$medidaId
微信媒体资源ID
$appId
应用ID
$safe
是否保密消息
$toparty
发送部门范围
$totag
发送标签范围

Returns

boolean
推送成功与否
public boolean
# sendImage( array $userIds, string $medidaId, integer $appId, integer $safe = 0, array $toparty = array(), array $totag = array() )

发送图片格式的消息

发送图片格式的消息

Parameters

$userIds
推送的微信用户ID
$medidaId
微信媒体资源ID
$appId
应用ID
$safe
是否保密消息
$toparty
发送部门范围
$totag
发送标签范围

Returns

boolean
推送成功与否
protected string
# handleFileType( string $ext, integer $size )

处理文件格式的类型描述

处理文件格式的类型描述

Parameters

$ext
文件后缀
$size
文件大小

Returns

string
符合微信端的格式则返回文件类型,否则返回空串
protected string
# handleNewsItems( array $items )

处理图文格式的项目为字符串

处理图文格式的项目为字符串

Parameters

$items

Returns

string
protected
# handleSendScope( array & $param, mixed $userIds = array(), array $toparty = array(), array $totag = array() )

处理主动发送消息范围

处理主动发送消息范围

Parameters

$param
$userIds
$toparty
$totag
IBOS open source API documentation generated by ApiGen