PHP Class Eloquent\Phony\Difference\DifferenceEngine

Datei anzeigen Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( FeatureDetector $featureDetector ) Construct a new difference engine.
difference ( string $from, string $to ) : string Get the difference between the supplied strings.
instance ( ) : DifferenceEngine Get the static instance of this engine.
setUseColor ( boolean | null $useColor ) Turn on or off the use of ANSI colored output.

Method Details

__construct() public method

Construct a new difference engine.
public __construct ( FeatureDetector $featureDetector )
$featureDetector Eloquent\Phony\Reflection\FeatureDetector The feature detector to use.

difference() public method

Get the difference between the supplied strings.
public difference ( string $from, string $to ) : string
$from string The from value.
$to string The to value.
return string The difference.

instance() public static method

Get the static instance of this engine.
public static instance ( ) : DifferenceEngine
return DifferenceEngine The static engine.

setUseColor() public method

Pass null to detect automatically.
public setUseColor ( boolean | null $useColor )
$useColor boolean | null True to use color.