PHP code example of combodo / itop-client-bundle

1. Go to this page and download the library: Download combodo/itop-client-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

combodo / itop-client-bundle example snippets


use Combodo\ItopClientBundle\RestClient\RequestOperation\Core\RequestOperationCoreCreate;
use Combodo\ItopClientBundle\RestClient\RestClient;

class Foo
{
    /**
     * @var RestClient
     */
    private $client;
    public function __construct(RestClient $client) 
    {    
        $this->client = $client;
    }

    public function bar()
    {
        $operation = new RequestOperationCoreCreate(
            'Class',
            'id',
            'my comment',
            [
                'title'             => 'foo',
                'description'       => 'bar',
                'caller_email'      => '[email protected]',
            ]
        );
        
        $this->client->executeOperation($operation);
    }    
}