imamuseum/emu-client

通过 IMu API 从 EMu 集合管理系统导出数据。

1.0.0 2016-06-09 14:26 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:09:24 UTC


README

与 IMu API for PHP v2.0 兼容 - http://imu.mel.kesoftware.com/doc/api/php/index.html

此包可以独立于 Laravel 框架运行。

Composer 配置

composer require imamuseum/emu-client

基本用法

use Imamuseum\EmuClient\EmuExport;

require_once __DIR__ . '/../vendor/autoload.php';

$config = require_once 'path/to/config/emu-client.php';

$emu = new EmuExport($config);
$emu->saveJsonFiles();

Laravel 用法

服务提供者

config\app.php 中添加到自动加载提供者 -

Imamuseum\EmuClient\EmuClientServiceProvider::class,

发布配置

php artisan vendor:publish

现在您可以在 config\emu-client.php 中设置 emu-client。

环境变量

添加到您的 .env

EMU_HOST=hostname
EMU_PORT=40000

Artisan 命令

php artisan emu:export

将输出块状 json 文件到您定义的 export_path 目录。