[ 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

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

return: string
param: array $orig
param: array $final
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.

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

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

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

difference( $a, $b )   X-Ref

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

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

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

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

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

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

return: bool Whether the property is set.
param: string $name Property to check if 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: Thu Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1