Back to Dagger

Changeset

docs/static/reference/php/Dagger/Changeset.html

0.20.76.1 KB
Original Source

Changeset

class Changeset extends AbstractObject implements IdAble

A comparison between two directories representing changes that can be applied.

Properties

| | $lastQuery | | from AbstractObject |

Methods

__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

from AbstractObject

null|array|string|int|float|bool

queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

from AbstractObject

array

addedPaths()

Files and directories that were added in the newer directory.

Directory

after()

The newer/upper snapshot.

File

asPatch()

Return a Git-compatible patch of the changes

Directory

before()

The older/lower snapshot to compare against.

array

diffStats()

Structured per-path diff statistics (kind and line counts) for this changeset.

string

export(string $path)

Applies the diff represented by this changeset to a path on the host.

AbstractId

id()

A unique identifier for this Changeset.

bool

isEmpty()

Returns true if the changeset is empty (i.e. there are no changes).

Directory

layer()

Return a snapshot containing only the created and modified files

array

modifiedPaths()

Files and directories that existed before and were updated in the newer directory.

array

removedPaths()

Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.

ChangesetId

sync()

Force evaluation in the engine.

Changeset

withChangeset(Changeset $changes, ChangesetMergeConflict|null $onConflict = null)

Add changes to an existing changeset

Changeset

withChangesets(array $changes, ChangesetsMergeConflict|null $onConflict = null)

Add changes from multiple changesets using git octopus merge strategy

Details

in AbstractObject at line 13 __construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

Parameters

| AbstractClient | $client | | | QueryBuilderChain | $queryBuilderChain | |

in AbstractObject at line 19 protected null|array|string|int|float|bool queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

Parameters

| QueryBuilder | $leafQueryBuilder | | | string | $leafKey | |

Return Value

| null|array|string|int|float|bool | |

at line 19 array addedPaths()

Files and directories that were added in the newer directory.

Return Value

| array | |

at line 28 Directory after()

The newer/upper snapshot.

Return Value

| Directory | |

at line 37 File asPatch()

Return a Git-compatible patch of the changes

Return Value

| File | |

at line 46 Directory before()

The older/lower snapshot to compare against.

Return Value

| Directory | |

at line 55 array diffStats()

Structured per-path diff statistics (kind and line counts) for this changeset.

Return Value

| array | |

at line 64 string export(string $path)

Applies the diff represented by this changeset to a path on the host.

Parameters

| string | $path | |

Return Value

| string | |

at line 74 AbstractId id()

A unique identifier for this Changeset.

Return Value

| AbstractId | |

at line 83 bool isEmpty()

Returns true if the changeset is empty (i.e. there are no changes).

Return Value

| bool | |

at line 92 Directory layer()

Return a snapshot containing only the created and modified files

Return Value

| Directory | |

at line 101 array modifiedPaths()

Files and directories that existed before and were updated in the newer directory.

Return Value

| array | |

at line 110 array removedPaths()

Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.

Return Value

| array | |

at line 119 ChangesetId sync()

Force evaluation in the engine.

Return Value

| ChangesetId | |

at line 130 Changeset withChangeset(Changeset $changes, ChangesetMergeConflict|null $onConflict = null)

Add changes to an existing changeset

By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument

Parameters

| Changeset | $changes | | | ChangesetMergeConflict|null | $onConflict | |

Return Value

| Changeset | |

at line 149 Changeset withChangesets(array $changes, ChangesetsMergeConflict|null $onConflict = null)

Add changes from multiple changesets using git octopus merge strategy

This is more efficient than chaining multiple withChangeset calls when merging many changesets.

Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).

Parameters

| array | $changes | | | ChangesetsMergeConflict|null | $onConflict | |

Return Value

| Changeset | |

Generated by Doctum, a API Documentation generator and fork of Sami.