承接 vvasystem/o-data 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vvasystem/o-data

最新稳定版本:1.0.1

Composer 安装命令:

composer require vvasystem/o-data

包简介

OData Client for PHP

README 文档

README

Package OData is designed to connect to REST API "1C:Enterprise" using the OData protocol.

Install

Via Composer

$ composer require vvasystem/o-data

Usage

1. Create connection

 $connection = ConnectionFactory::getInstance('http://localhost/test/odata/standard.odata', 'test', 'test');

2. Create table

TestTable.php

use OData\Client\Table;

class TestTable extends Table
{
    /**
     * @inheritdoc
     */
    protected $_name = 'Catalog_Склады';
    
    /**
     * @inheritdoc
     */
    protected $_primary = 'Ref_Key';
}
 $table = new TestTable(['connection' => $connection]);

3. Execute query

 $resultRow = $table->insert([
    'Code'        => 'Test',
    'Discription' => 'Test',
 ]);
 
 \var_dump($resultRow);
 array(3) { 
    ["Ref_Key"]=> string(36) "31b2c19f-e241-11e6-8108-005056a77adb"
    ["Code"]=> string(5) "Test" 
    ["Discription"]=> string(5) "Test" 
 }

 $resultRow = $table->update([
    'Code'        => 'Test1',
    'Discription' => 'Test1',
 ], '31b2c19f-e241-11e6-8108-005056a77adb');
 
 $table->delete('31b2c19f-e241-11e6-8108-005056a77adb');
 
 // For getting count of entries
 $count = $table->count();
 
 // Running RPC
 $result = $table->call('SelectChanges', [
    'DataExchangePoint' => 'http://localhost/1c/odata/standard.odata/ExchangePlan_Обмен(guid'9d586f0e-afec-11e7-be8e-b888e3a9a739')',
    'MessageNo'         => '123456',
 ]);
 

License

The MIT License (MIT).

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固