Ejemplo n.º 1
0
 /**
  * @param Button $button
  * @throws \Jenner\Wechat\Exception\WechatException
  */
 public function addSubButton(Button $button)
 {
     if (!isset($this->button['sub_button'])) {
         $this->button['sub_button'] = [];
     }
     if (count($this->button) == 5) {
         throw new WechatException('too many sub buttons');
     }
     $this->button['sub_button'][] = $button->getButton();
 }
Ejemplo n.º 2
0
 public function addButton(Button $button)
 {
     $this->buttons[] = $button->getButton();
 }