Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ouwiki_line Class Reference

Class representing one 'line' of HTML content for the purpose of text comparison. More...

Public Member Functions

 __construct ($data, $linepos)
 Construct line object based on a chunk of text. More...
 
 get_as_string ()
 
 is_empty ()
 
 ouwiki_line ($data, $linepos)
 Old syntax of class constructor. More...
 

Static Public Member Functions

static get_as_strings ($lines)
 Static function converts lines to strings. More...
 

Public Attributes

 $words =array()
 Array of ouwiki_words.
 

Detailed Description

Class representing one 'line' of HTML content for the purpose of text comparison.

Constructor & Destructor Documentation

◆ __construct()

ouwiki_line::__construct (   $data,
  $linepos 
)

Construct line object based on a chunk of text.

Parameters
string$dataText data that makes up this 'line'. (May include line breaks etc.)
int$lineposPosition number for first character in text

Member Function Documentation

◆ get_as_string()

ouwiki_line::get_as_string ( )
Return values
stringNormalised string representation of this line object

◆ get_as_strings()

static ouwiki_line::get_as_strings (   $lines)
static

Static function converts lines to strings.

Parameters
array$linesArray of ouwiki_line
Return values
arrayArray of strings

◆ is_empty()

ouwiki_line::is_empty ( )
Return values
Trueif there are no words in the line

◆ ouwiki_line()

ouwiki_line::ouwiki_line (   $data,
  $linepos 
)

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated:
since Moodle 3.1

The documentation for this class was generated from the following file: