0hr/php-webview 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

0hr/php-webview

最新稳定版本:0.1.2

Composer 安装命令:

composer require 0hr/php-webview

包简介

Php zserge's Webview bindings

README 文档

README

Php WebView Library

PHP bindings for zserge's Webview

Installation

composer require 0hr/php-webview

Examples

Hello World Application Example

#!/usr/bin/env php

<?php

require_once './vendor/autoload.php';

use PhpWebView\WebView;
use PhpWebView\WindowSizeHint;

$webview = new WebView('Php WebView', 480, 320, WindowSizeHint::HINT_NONE, true);

$webview->setHTML('<center> Hello World </center>');

$webview->run();
$webview->destroy();

Bindings Example

$webview->bind('save', function ($seq, $req, $context) use (&$list) {
    $name = $req[0];
    $lastname = $req[1];
    if (empty($name) || empty($lastname)) {
        return ['name' => empty($name), 'lastname' => empty($lastname)];
    } else {
        $list[] = ['name' => $name, 'lastname' => $lastname];
    }

    return [];
});

$webview->bind('getList', function ($seq, $req, $context) use ($webview, &$list) {
    $webview->returnValue($seq, 0, $list);
});

Building

For prerequisites, read The link

To build the library, run src/webview/build.sh on Unix-based systems, src/webview/build.bat on Windows

统计信息

  • 总下载量: 144
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 63
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 63
  • Watchers: 2
  • Forks: 6
  • 开发语言: C++

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-09