Documentation

DiffEngineFactory
in package

Load a Diff Engine.

Table of Contents

fromFileLineArrays()  : DiffEngineInterface
Shortcut constructor, internally creating the Engine instance.
fromString()  : DiffEngineInterface
Shortcut constructor, internally creating the Engine instance.

Methods

fromFileLineArrays()

Shortcut constructor, internally creating the Engine instance.

public static fromFileLineArrays([array<string|int, mixed> $fromLines = [] ][, array<string|int, mixed> $toLines = [] ][, string $engineClass = 'auto' ][, array<string|int, mixed> $engineParams = [] ]) : DiffEngineInterface

Default is Auto, meaning it will use XDiffEngine if available, otherwise resort to NativeEngine If you really care about what engine provides the OperationList, implement your own

Use this to create

  • NativeEngine
  • XDiffEngine
  • ShellEngine
  • "Auto": The most appropriate engine to deal with two arrays of file lines
  • Explicitly any other engine that initializes from two arrays of lines
Parameters
$fromLines : array<string|int, mixed> = []
$toLines : array<string|int, mixed> = []
$engineClass : string = 'auto'
$engineParams : array<string|int, mixed> = []
Return values
DiffEngineInterface

fromString()

Shortcut constructor, internally creating the Engine instance.

public static fromString(string $diff[, string $engineClass = 'auto' ][, mixed $engineParams = ['mode' => 'autodetect'] ]) : DiffEngineInterface

Default is Auto, meaning it will use XDiffEngine if available, otherwise resort to NativeEngine If you really care about what engine provides the OperationList, implement your own

Use this to create

  • StringEngine
  • "Auto": The most appropriate engine to deal with a single string diff source
  • Explicitly any other engine that initializes from a single string diff source
Parameters
$diff : string
$engineClass : string = 'auto'
$engineParams : mixed = ['mode' => 'autodetect']
Return values
DiffEngineInterface

Search results