Heratio Framework API Reference

StandaloneActorWriteService
in package
implements ActorWriteServiceInterface uses EntityWriteTrait

Standalone actor write service using Laravel Query Builder only.

Clean implementation without Propel references or class_exists checks. Handles the AtoM entity inheritance chain: object -> actor -> actor_i18n

Actor has 13 i18n fields in the actor_i18n table.

Table of Contents

Interfaces

ActorWriteServiceInterface
Contract for actor write operations.

Methods

createActor()  : int
Create a new actor. Returns the new actor ID.
createRelation()  : int
Create a relation between two objects.
saveActor()  : int
Save an actor with properties already set (Propel mode).
updateActor()  : void
Update an existing actor.

Methods

createActor()

Create a new actor. Returns the new actor ID.

public createActor(array<string|int, mixed> $data[, string $culture = 'en' ]) : int

Handles the AtoM entity inheritance: INSERT object -> INSERT actor -> INSERT actor_i18n.

Parameters
$data : array<string|int, mixed>

Actor data (entity_type_id, authorized_form_of_name, etc.)

$culture : string = 'en'

Culture code (e.g., 'en')

Return values
int

The new actor.id

createRelation()

Create a relation between two objects.

public createRelation(int $subjectId, int $objectId, int $typeId) : int

relation table: subject_id, object_id, type_id

Parameters
$subjectId : int

Subject object ID

$objectId : int

Related object ID

$typeId : int

Relation type term ID

Return values
int

The new relation.id

saveActor()

Save an actor with properties already set (Propel mode).

public saveActor(object $actor) : int

In Propel mode, calls $actor->save(). In standalone mode, extracts properties and does DB inserts.

Parameters
$actor : object

The actor object (QubitActor or stdClass)

Return values
int

The actor ID

updateActor()

Update an existing actor.

public updateActor(int $id, array<string|int, mixed> $data[, string $culture = 'en' ]) : void
Parameters
$id : int

Actor ID

$data : array<string|int, mixed>

Column => value pairs to update

$culture : string = 'en'

Culture code for i18n attributes


        
On this page

Search results