[ 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.

param: array $params
since: 2.6.0

_startBlock( $header )   X-Ref

param: string $header
return: string

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

param: array  $lines
param: string $prefix

addedLine( $line )   X-Ref

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

deletedLine( $line )   X-Ref

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

contextLine( $line )   X-Ref

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

emptyLine()   X-Ref

return: string

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

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

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

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

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

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

_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

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

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

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

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

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

difference( $a, $b )   X-Ref

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

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

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

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

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

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

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

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

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



Generated: Fri Oct 4 01:00:02 2024 Cross-referenced by PHPXref 0.7.1