diff --git a/HtmlDiff.php b/HtmlDiff.php index 74a5d35..2a126d3 100644 --- a/HtmlDiff.php +++ b/HtmlDiff.php @@ -18,6 +18,17 @@ public function __construct( $oldText, $newText, $encoding = 'UTF-8' ) { $this->encoding = $encoding; $this->content = ''; } + + public function getFiles($files = array()) { + $oldText = (isset($files['oldText']) ? $files['oldText'] : ''); + $newText = (isset($files['newText']) ? $files['newText'] : ''); + $encoding = (isset($arr['encoding']) ? $arr['encoding'] : 'UTF-8'); + + $this->oldText = $this->purifyHtml( trim( $oldText ) ); + $this->newText = $this->purifyHtml( trim( $newText ) ); + $this->encoding = $encoding; + $this->content = ''; + } public function getOldHtml() { return $this->oldText;