Breaking up text to 32 character length on space.
This commit is contained in:
@@ -98,6 +98,18 @@ class HtmlToPos
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* łamie tekst w miejscu spacji do długości 32 znaki na linię
|
||||||
|
* @param $posText
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function textBreak($posText)
|
||||||
|
{
|
||||||
|
$posText = wordwrap($posText, 32);
|
||||||
|
return $posText;
|
||||||
|
}
|
||||||
|
|
||||||
public function convert($html = '')
|
public function convert($html = '')
|
||||||
{
|
{
|
||||||
$posText = $this->handleNewLine($html);
|
$posText = $this->handleNewLine($html);
|
||||||
@@ -107,8 +119,8 @@ class HtmlToPos
|
|||||||
$posText = $this->vocabularyWord($posText);
|
$posText = $this->vocabularyWord($posText);
|
||||||
$posText = $this->traficar($posText);
|
$posText = $this->traficar($posText);
|
||||||
|
|
||||||
// print_r($posText);
|
$posText = $this->textBreak($posText);
|
||||||
// die();
|
|
||||||
return $posText;
|
return $posText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user