Skip to content

change TemplateProcessor to protected #498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/PhpWord/TemplateProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,33 @@ class TemplateProcessor
*
* @var mixed
*/
private $zipClass;
protected $zipClass;

/**
* @var string Temporary document filename (with path).
*/
private $temporaryDocumentFilename;
protected $temporaryDocumentFilename;

/**
* Content of main document part (in XML format) of the temporary document.
*
* @var string
*/
private $temporaryDocumentMainPart;
protected $temporaryDocumentMainPart;

/**
* Content of headers (in XML format) of the temporary document.
*
* @var string[]
*/
private $temporaryDocumentHeaders = array();
protected $temporaryDocumentHeaders = array();

/**
* Content of footers (in XML format) of the temporary document.
*
* @var string[]
*/
private $temporaryDocumentFooters = array();
protected $temporaryDocumentFooters = array();

/**
* @since 0.12.0 Throws CreateTemporaryFileException and CopyFileException instead of Exception.
Expand Down Expand Up @@ -389,7 +389,7 @@ protected function getVariablesForPart($documentPartXML)
* @param integer $index
* @return string
*/
private function getFooterName($index)
protected function getFooterName($index)
{
return sprintf('word/footer%d.xml', $index);
}
Expand All @@ -400,7 +400,7 @@ private function getFooterName($index)
* @param integer $index
* @return string
*/
private function getHeaderName($index)
protected function getHeaderName($index)
{
return sprintf('word/header%d.xml', $index);
}
Expand All @@ -412,7 +412,7 @@ private function getHeaderName($index)
* @return integer
* @throws \PhpOffice\PhpWord\Exception\Exception
*/
private function findRowStart($offset)
protected function findRowStart($offset)
{
$rowStart = strrpos($this->temporaryDocumentMainPart, '<w:tr ', ((strlen($this->temporaryDocumentMainPart) - $offset) * -1));

Expand All @@ -432,7 +432,7 @@ private function findRowStart($offset)
* @param integer $offset
* @return integer
*/
private function findRowEnd($offset)
protected function findRowEnd($offset)
{
return strpos($this->temporaryDocumentMainPart, '</w:tr>', $offset) + 7;
}
Expand All @@ -444,7 +444,7 @@ private function findRowEnd($offset)
* @param integer $endPosition
* @return string
*/
private function getSlice($startPosition, $endPosition = 0)
protected function getSlice($startPosition, $endPosition = 0)
{
if (!$endPosition) {
$endPosition = strlen($this->temporaryDocumentMainPart);
Expand Down