2017 © Pedro Peláez
 

library glpi-webservice-php-wrapper

PHP wrapper class for GLPI Webservice Plugin

image

vitorbari/glpi-webservice-php-wrapper

PHP wrapper class for GLPI Webservice Plugin

  • Wednesday, August 2, 2017
  • by vitorbari
  • Repository
  • 1 Watchers
  • 0 Stars
  • 58 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 12 Versions
  • 14 % Grown

The README.md

glpi-webservice-php-wrapper

Build Status StyleCI Coverage Status, (*1)

, (*2)

Introduction

A simple object orientated wrapper for the GLPI Webservice Plugin, written in PHP., (*3)

The intention of this class is to allow PHP application developers quick and easy interaction with the GLPI Webservice Plugin, without having to worry about the finer details of the Webservice., (*4)

Installation

Via Composer., (*5)

composer require vitorbari/glpi-webservice-php-wrapper

Usage Example

use VitorBari\GLPIWebservice\Services\Soap;
use VitorBari\GLPIWebservice\GLPIWebservice;

// Create soap adapter
// Currently, only soap is implemented, but the plugin also supports XMLRPC and REST
$endpoint = 'http://[glpi-url]/plugins/webservices/soap.php';
$soapClient = new SoapClient(null, array('uri' => $endpoint, 'location' => $endpoint));
$service = new Soap($soapClient);

$glpi = new GLPIWebservice($service);

$glpi->auth('username', 'password');
$glpi->listUserGroups();

// You can use method chaining
$glpi->auth('username', 'password')->listUserGroups();

Methods

Not authenticated methods

  • $glpi->test() Simple ping test method
  • $glpi->status() Give the GLPI status
  • $glpi->listAllMethods() List all the method allowed to current client
  • $glpi->listEntities() Return list of current entities defined by server configuration for the client
  • $glpi->countEntities() Return number of current entities defined by server configuration for the client
  • $glpi->listKnowBaseItems() Not Implemented
  • $glpi->getDocument($document, $ticket = null, $id2name = false) Retrieve a document if the authenticated user can view it

Session

  • $glpi->auth($glpi_user, $glpi_pass, $ws_user = null, $ws_pass = null) Authenticate a user
  • $glpi->logout() Logout current user
  • $glpi->getSession() Get current session
  • $glpi->getMyInfo($id2name=false) List the information about the authenticated user

Authenticated methods

Ticket

  • $glpi->getTicket($ticket, $id2name=false) Retrieve information on a existing ticket if the authenticated user can view it
  • $glpi->createTicket($title, $content, $params = array()) Create a new ticket
  • $glpi->listTickets($status=null, $id2name=false) List the Tickets the current authenticated user can view
  • $glpi->countTickets($status=null) Count the Tickets the current authenticated user can view
  • $glpi->addTicketDocument($ticket, $name, $uri = null, $base64 = null, $content = null) Add a document to an existing ticket if the authenticated user can edit it
  • $glpi->addTicketFollowup($ticket, $content, $users_login = false, $source = null, $private = null, $reopen = null, $close = null) Add a followup to an existing ticket if the authenticated user can edit it
  • $glpi->addTicketObserver($ticket, $user = null) Add a new observer to an existing ticket
  • $glpi->setTicketSatisfaction($ticket, $satisfaction, $comment = null) Answer to the ticket satisfaction survey
  • $glpi->setTicketValidation($approval, $status, $comment = null) Answer to a ticket approval request
  • $glpi->setTicketSolution($ticket, $type, $solution) Solution for a ticket
  • $glpi->setTicketAssign($ticket, $user = null, $group = null, $supplier = null, $user_email = null, $use_email_notification = null) Assign a ticket
  • $glpi->listDropdownValues($dropdown) Search for values in a dropdown table

Group

  • $glpi->listGroups() List groups of the current entities
  • $glpi->listUserGroups() List groups of connected user
  • $glpi->countGroups() Count groups of the current entities

Object

  • $glpi->getObject($itemtype, $id, $params = array()) Retrieve information on a existing object if the authenticated user is a super-admin
  • $glpi->createObjects() Not Implemented
  • $glpi->deleteObjects() Not Implemented
  • $glpi->updateObjects() Not Implemented
  • $glpi->linkObjects() Not Implemented
  • $glpi->listObjects() Not Implemented

Requirements

  • PHP >= 5.6.0
  • PHP Soap Extension

Versions

It has only been tested on GLPI v0.85.3 and Webservice Plugin v1.5.0., (*6)

The Versions

02/08 2017

dev-master

9999999-dev

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • ext-soap *
  • php >=5.6.0

 

The Development Requires

by Vitor Bari Buccianti

webservice glpi

28/04 2017

2.0.1-alpha

2.0.1.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.6.0
  • ext-soap *

 

The Development Requires

by Vitor Bari Buccianti

webservice glpi

28/04 2017

2.0.0-alpha

2.0.0.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

The Development Requires

by Vitor Bari Buccianti

webservice glpi

10/04 2017

1.0.8-alpha

1.0.8.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

07/04 2017

1.0.7-alpha

1.0.7.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

06/04 2017

1.0.6-alpha

1.0.6.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

05/04 2017

1.0.5-alpha

1.0.5.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

03/04 2017

1.0.4-alpha

1.0.4.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

31/03 2017

1.0.3-alpha

1.0.3.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

30/09 2016

1.0.2-alpha

1.0.2.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

05/08 2016

1.0.1-alpha

1.0.1.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi

05/08 2016

1.0.0-alpha

1.0.0.0-alpha

PHP wrapper class for GLPI Webservice Plugin

  Sources   Download

Apache

The Requires

  • php >=5.3.0
  • ext-soap *

 

by Vitor Bari Buccianti

webservice glpi