<?phpnamespace wework\struct\menu;use wework\Utils;class ScanCodePushMenu implements MenuItem{public $type = "scancode_push";/** @var string */public $name = null;/** @var string */public $key = null;/** @var array xxxMenu array */public $sub_button = null;public function __construct($name = null, $key = null, $xxmenuArray = null){$this->name = $name;$this->key = $key;$this->sub_button = $xxmenuArray;}public static function Array2Menu($arr){$menu = new ScanCodePushMenu();$menu->type = Utils::arrayGet($arr, "type");$menu->name = Utils::arrayGet($arr, "name");$menu->key = Utils::arrayGet($arr, "key");foreach ($arr["sub_button"] as $item) {$subButton = null;if (!array_key_exists("type", $item)) {$subButton = SubMenu::Array2Menu($item);} else {$type = $item["type"];if ($type == "click") {$subButton = ClickMenu::Array2Menu($item);}if ($type == "view") {$subButton = ViewMenu::Array2Menu($item);}if ($type == "scancode_push") {$subButton = ScanCodePushMenu::Array2Menu($item);}if ($type == "scancode_waitmsg") {$subButton = ScanCodeWaitMsgMenu::Array2Menu($item);}if ($type == "pic_sysphoto") {$subButton = PicSysPhotoMenu::Array2Menu($item);}if ($type == "pic_photo_or_album") {$subButton = PicPhotoOrAlbumMenu::Array2Menu($item);}if ($type == "pic_weixin") {$subButton = PicWeixinMenu::Array2Menu($item);}if ($type == "location_select") {$subButton = LocationSelectMenu::Array2Menu($item);}}$menu->sub_button[] = $subButton;}return $menu;}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。