Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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.
 
 get_as_string ()
 
 is_empty ()
 
 ouwiki_line ($data, $linepos)
 Old syntax of class constructor.
 

Static Public Member Functions

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

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: