定制 inetprocess/libinventoryclient 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

inetprocess/libinventoryclient

Composer 安装命令:

composer require inetprocess/libinventoryclient

包简介

This library provides various classes to get information about a SugarCRM Installation

关键字:

README 文档

README

PHP library to fetch information from the system and SugarCRM and send it to an inventory server (REST API)

Facter

Fetch informations about the system or a SugarCRM Instance and return a key, value PHP array.

Usage

System Facter

use Inet\Inventory\Facter\SystemFacter;
$facter = new SystemFacter();
$facts = $facter->getFacts();
var_dump($facts);
array(20) {
  'system_uptime' =>
  array(4) {
    'seconds' =>
    int(2353764)
    'hours' =>
    double(653)
    'days' =>
    double(27)
    'uptime' =>
    string(40) "27 days, 5 hours, 49 minutes, 54 seconds"
  }
  'architecture' =>
  string(6) "x86_64"
  ...

SugarCRM Facter

use Psr\Log\NullLogger;
use Inet\SugarCRM\Application;
use Inet\SugarCRM\Database\SugarPDO;
use Inet\Inventory\Facter\SugarFacter;

$app = new Application(new NullLogger(), 'path/to/sugarcrm');
$facter = new SugarFacter($app, new SugarPDO($app));
$facts = $facter->getFacts();
var_dump($facts);
array(17) {
  'version' =>
  string(7) "7.6.0.0"
  'db_version' =>
  string(7) "7.6.0.0"
  'flavor' =>
  string(3) "PRO"
  'build' =>
  string(4) "1552"
  'build_timestamp' =>
  string(18) "2015-06-05 03:29pm"
  ...

Combine facters

use Inet\Inventory\Facter\MultiFacterFacter;
$facter = new MultiFacterFacter(array($system_facter));
$facter->addFacter($sugar_facter);
$facts = $facter->getFacts();

Agent

Send information to a REST API. Three entities are used:

  • Account : Client name.
  • Server : Sugarcrm host and OS informations.
  • SugarCRM instance: Installed SugarCRM instance. It is related to an account and a server. The API is described in src/InventoryService.json.

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 7
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-01-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固