src/CMDBObject.php
public function create($type, $title, array $attributes = []) {
        $attributes['type'] = $type;
        $attributes['title'] = $title;

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

        if (array_key_exists('id', $result)) {
            return $result['id'];
        } else {
            throw new RuntimeException('Unable to create object');
        }
    }
public function create($type, $title, array $attributes = []) {
        $attributes['type'] = $type;
        $attributes['title'] = $title;

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

        if (array_key_exists('id', $result)) {
            return $result['id'];
        } else {
            throw new RuntimeException('Unable to create object');
        }
    }
public function create ( $ type , $ title , array $ attributes = [ ] ) { $ attributes [ 'type' ] = $ type ; $ attributes [ 'title' ] = $ title ; $ result = $ this -> api -> request ( 'cmdb.object.create' , $ attributes ) ; if ( array_key_exists ( 'id' , $ result ) ) { return $ result [ 'id' ] ; } else { throw new RuntimeException ( 'Unable to create object' ) ; } }
Create new object

@param int|string $type Object type identifier or its constant
@param string $title Object title
@param array $attributes (Optional) additional common attributes:
string|int "category",
string|int "cmdb_status",
0|1 "defaultTemplate",
string "description",
string|int "purpose",
int "status",
string "sysid"

@return int Object identifier

@throws Exception on error
Create new object