SynchronizeResult

Class
Final: Yes

Result object for skill synchronization operations.

Description

Tracks the outcomes of a synchronization run, including newly created links, existing items that were preserved, and broken links that were removed. The failed flag indicates whether an error occurred during synchronization.

Table of Contents

Properties

$createdLinks

List of skill names for which new symlinks were created.

 : array<int, string>
$failed

Indicates whether the synchronization encountered a failure.

 : bool
$preservedLinks

List of skill names for which existing items were left unchanged.

 : array<int, string>
$removedBrokenLinks

List of skill names whose broken symlinks were removed during sync.

 : array<int, string>

Methods

addCreatedLink()

Records a skill for which a new symlink was created.

 : void
addPreservedLink()

Records a skill whose existing item was preserved unchanged.

 : void
addRemovedBrokenLink()

Records a skill whose broken symlink was removed during sync.

 : void
failed()

Indicates whether the synchronization encountered a failure.

 : bool
getCreatedLinks()

Returns the list of skills for which new symlinks were created.

 : array<int, string>
getPreservedLinks()

Returns the list of skills whose existing items were preserved.

 : array<int, string>
getRemovedBrokenLinks()

Returns the list of skills whose broken symlinks were removed.

 : array<int, string>
markFailed()

Marks the synchronization as failed due to an error condition.

 : void
Properties
Private

List of skill names for which new symlinks were created.

private array<int, string> $createdLinks = []

$failed

Private

Indicates whether the synchronization encountered a failure.

private bool $failed = false
Private

List of skill names for which existing items were left unchanged.

private array<int, string> $preservedLinks = []
Private

List of skill names whose broken symlinks were removed during sync.

private array<int, string> $removedBrokenLinks = []
Methods
Public

Records a skill for which a new symlink was created.

public addCreatedLink( string  $link) : void
Parameters
$link : string

Description

Name of the skill that received a new symlink

Public

Records a skill whose existing item was preserved unchanged.

public addPreservedLink( string  $link) : void
Parameters
$link : string

Description

Name of the skill that was left in place

Public

Records a skill whose broken symlink was removed during sync.

public addRemovedBrokenLink( string  $link) : void
Parameters
$link : string

Description

Name of the skill whose broken link was removed

failed()

Public

Indicates whether the synchronization encountered a failure.

public failed() : bool
Return values
bool

Description

True if an error occurred, false otherwise

Public

Returns the list of skills for which new symlinks were created.

public getCreatedLinks() : array<int, string>
Return values
array<int, string>

Description

Skill names of newly created links

Public

Returns the list of skills whose existing items were preserved.

public getPreservedLinks() : array<int, string>
Return values
array<int, string>

Description

Skill names of preserved items

Public

Returns the list of skills whose broken symlinks were removed.

public getRemovedBrokenLinks() : array<int, string>
Return values
array<int, string>

Description

Skill names of removed broken links

markFailed()

Public

Marks the synchronization as failed due to an error condition.

public markFailed() : void