nguyenanhung / mantis-connector
Mantis Bug Tracker Connector
Installs: 17 673
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=7.0
- ext-curl: *
- ext-json: *
- nguyenanhung/nusoap: ^0.9
README
Mantis Bug Tracker Connector
Version
- V1.x support all PHP version
>=5.4
- V2.x support all PHP version
>=7.0
Cài packages vào trong repositories
composer require nguyenanhung/mantis-connector
Hướng dẫn sử dụng
Quick Function
Tham khảo đoạn code bên dưới
<?php /** * Project mantis-connector * Created by PhpStorm * User: 713uk13m <dev@nguyenanhung.com> * Copyright: 713uk13m <dev@nguyenanhung.com> * Date: 2/10/20 * Time: 15:16 */ require_once __DIR__ . '/vendor/autoload.php'; // Cấu hình Monitor $config = array( 'monitorUrl' => 'xxx', 'monitorUser' => 'xxx', 'monitorPassword' => 'xxx', 'monitorProjectId' => 1, 'monitorUsername' => 'hungna', ); $result = mantis_report($config, 'Tên bug', 'Mô tả chi tiết');
With Class
Tham khảo đoạn code bên dưới
<?php /** * Project mantis-connector * Created by PhpStorm * User: 713uk13m <dev@nguyenanhung.com> * Copyright: 713uk13m <dev@nguyenanhung.com> * Date: 2/10/20 * Time: 15:27 */ require_once __DIR__ . '/vendor/autoload.php'; // Cấu hình Monitor $config = array( 'monitorUrl' => 'xxx', 'monitorUser' => 'xxx', 'monitorPassword' => 'xxx', 'monitorProjectId' => 1, 'monitorUsername' => 'hungna', ); $base = new nguyenanhung\MantisBT\MantisConnector(); $base->setMonitorUrl($config['monitorUrl'])->setMonitorUser($config['monitorUser'])->setMonitorPassword($config['monitorPassword'])->setProjectId($config['monitorProjectId'])->setUsername($config['monitorUsername']); $result = $base->mantis('Tên bug', 'Mô tả bug'); echo "<pre>"; print_r($result); echo "</pre>";