Text_Diff_Engine_shell::_getLines
Get lines from either the old or new text
Метод класса: Text_Diff_Engine_shell{}
Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.
Хуков нет.
Возвращает
Массив. The chopped lines
Использование
$Text_Diff_Engine_shell = new Text_Diff_Engine_shell(); $Text_Diff_Engine_shell->_getLines( $text_lines, $line_no, $end );
- $text_lines(массив) (обязательный) (передается по ссылке — &)
- Either
$from_linesor$to_lines(passed by reference). - $line_no(int) (обязательный) (передается по ссылке — &)
- Current line number (passed by reference).
- $end(int)
- Optional end line, when we want to chop more than one line.
По умолчанию:false
Код Text_Diff_Engine_shell::_getLines() Text Diff Engine shell:: getLines WP 6.9.4
function _getLines(&$text_lines, &$line_no, $end = false)
{
if (!empty($end)) {
$lines = array();
// We can shift even more
while ($line_no <= $end) {
array_push($lines, array_shift($text_lines));
$line_no++;
}
} else {
$lines = array(array_shift($text_lines));
$line_no++;
}
return $lines;
}