PHP Class Thenbsp\Wechat\Menu\ButtonCollection

Inheritance: implements Thenbsp\Wechat\Menu\ButtonInterface, implements Thenbsp\Wechat\Menu\ButtonCollectionInterface
Show file Open project: thenbsp/wechat Class Usage Examples

Protected Properties

Property Type Description
$child 子菜单集合
$name 菜单名称

Public Methods

Method Description
__construct ( $name ) 构造方法
addChild ( Thenbsp\Wechat\Menu\ButtonInterface $button ) 添加子菜单
getChild ( ) 获取子菜单
getData ( ) 获取菜单数据
hasChild ( ) 检测是否有子菜单

Method Details

__construct() public method

构造方法
public __construct ( $name )

addChild() public method

添加子菜单
public addChild ( Thenbsp\Wechat\Menu\ButtonInterface $button )
$button Thenbsp\Wechat\Menu\ButtonInterface

getChild() public method

获取子菜单
public getChild ( )

getData() public method

获取菜单数据
public getData ( )

hasChild() public method

检测是否有子菜单
public hasChild ( )

Property Details

$child protected property

子菜单集合
protected $child

$name protected property

菜单名称
protected $name