[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/ -> class-wp-text-diff-renderer-table.php (summary)

Diff API: WP_Text_Diff_Renderer_Table class

File Size: 551 lines (17 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_Text_Diff_Renderer_Table:: (18 methods):
  __construct()
  _startBlock()
  _lines()
  addedLine()
  deletedLine()
  contextLine()
  emptyLine()
  _added()
  _deleted()
  _context()
  _changed()
  interleave_changed_lines()
  compute_string_distance()
  difference()
  __get()
  __set()
  __isset()
  __unset()


Class: WP_Text_Diff_Renderer_Table  - X-Ref

Table renderer to display the diff lines.

__construct( $params = array()   X-Ref
Constructor - Call parent constructor with params array.

This will set class properties based on the key value pairs in the array.

since: 2.6.0
param: array $params

_startBlock( $header )   X-Ref

return: string
param: string $header

_lines( $lines, $prefix = ' ' )   X-Ref

param: array  $lines
param: string $prefix

addedLine( $line )   X-Ref

return: string
param: string $line HTML-escape the value.

deletedLine( $line )   X-Ref

return: string
param: string $line HTML-escape the value.

contextLine( $line )   X-Ref

return: string
param: string $line HTML-escape the value.

emptyLine()   X-Ref

return: string

_added( $lines, $encode = true )   X-Ref

return: string
param: array $lines
param: bool  $encode

_deleted( $lines, $encode = true )   X-Ref

return: string
param: array $lines
param: bool  $encode

_context( $lines, $encode = true )   X-Ref

return: string
param: array $lines
param: bool  $encode

_changed( $orig, $final )   X-Ref
Process changed lines to do word-by-word diffs for extra highlighting.

(TRAC style) sometimes these lines can actually be deleted or added rows.
We do additional processing to figure that out

since: 2.6.0
return: string
param: array $orig
param: array $final

interleave_changed_lines( $orig, $final )   X-Ref
Takes changed blocks and matches which rows in orig turned into which rows in final.

since: 2.6.0
return: array {
param: array $orig  Lines of the original version of the text.
param: array $final Lines of the final version of the text.

compute_string_distance( $string1, $string2 )   X-Ref
Computes a number that is intended to reflect the "distance" between two strings.

since: 2.6.0
return: int
param: string $string1
param: string $string2

difference( $a, $b )   X-Ref

since: 2.6.0
return: int
param: int $a
param: int $b

__get( $name )   X-Ref
Make private properties readable for backward compatibility.

since: 4.0.0
return: mixed Property.
param: string $name Property to get.

__set( $name, $value )   X-Ref
Make private properties settable for backward compatibility.

since: 4.0.0
return: mixed Newly-set property.
param: string $name  Property to check if set.
param: mixed  $value Property value.

__isset( $name )   X-Ref
Make private properties checkable for backward compatibility.

since: 4.0.0
return: bool Whether the property is set.
param: string $name Property to check if set.

__unset( $name )   X-Ref
Make private properties un-settable for backward compatibility.

since: 4.0.0
param: string $name Property to unset.



Generated: Sun Apr 28 01:00:03 2024 Cross-referenced by PHPXref 0.7.1