src/CMDBLogbook.php
public function create($objectID, $message, $description = null) {
        $params = [
            'object_id' => $objectID,
            'message' => $message
        ];

        if (isset($description)) {
            $params['description'] = $description;
        }

        $result = $this->api->request(
            'cmdb.logbook.create',
            $params
        );

        if (!array_key_exists('success', $result) ||
            $result['success'] !== true) {
            if (array_key_exists('message', $result)) {
                throw new RuntimeException(sprintf('Bad result: %s', $result['message']));
            } else {
                throw new RuntimeException('Bad result');
            }
        }

        return $this;
    }
public function create($objectID, $message, $description = null) {
        $params = [
            'object_id' => $objectID,
            'message' => $message
        ];

        if (isset($description)) {
            $params['description'] = $description;
        }

        $result = $this->api->request(
            'cmdb.logbook.create',
            $params
        );

        if (!array_key_exists('success', $result) ||
            $result['success'] !== true) {
            if (array_key_exists('message', $result)) {
                throw new RuntimeException(sprintf('Bad result: %s', $result['message']));
            } else {
                throw new RuntimeException('Bad result');
            }
        }

        return $this;
    }
public function create ( $ objectID , $ message , $ description = null ) { $ params = [ 'object_id' => $ objectID , 'message' => $ message ] ; if ( isset ( $ description ) ) { $ params [ 'description' ] = $ description ; } $ result = $ this -> api -> request ( 'cmdb.logbook.create' , $ params ) ; if ( ! array_key_exists ( 'success' , $ result ) || $ result [ 'success' ] !== true ) { if ( array_key_exists ( 'message' , $ result ) ) { throw new RuntimeException ( sprintf ( 'Bad result: %s' , $ result [ 'message' ] ) ) ; } else { throw new RuntimeException ( 'Bad result' ) ; } } return $ this ; }
Create a new logbook entry

@param int $objectID Object identifier
@param string $message Message
@param string $description (optional) Description

@return self Returns itself

@throws Exception on error
Create a new logbook entry