Remove zend-stdlib dependency
This commit is contained in:
parent
99d8b5256f
commit
d061c6dc7c
|
|
@ -61,7 +61,6 @@
|
||||||
"php": "^5.3.3 || ^7.0",
|
"php": "^5.3.3 || ^7.0",
|
||||||
"ext-xml": "*",
|
"ext-xml": "*",
|
||||||
"zendframework/zend-escaper": "^2.2",
|
"zendframework/zend-escaper": "^2.2",
|
||||||
"zendframework/zend-stdlib": "^2.2 || ^3.0",
|
|
||||||
"phpoffice/common": "^0.2"
|
"phpoffice/common": "^0.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
namespace PhpOffice\PhpWord;
|
namespace PhpOffice\PhpWord;
|
||||||
|
|
||||||
|
use PhpOffice\Common\Text;
|
||||||
use PhpOffice\PhpWord\Escaper\RegExp;
|
use PhpOffice\PhpWord\Escaper\RegExp;
|
||||||
use PhpOffice\PhpWord\Escaper\Xml;
|
use PhpOffice\PhpWord\Escaper\Xml;
|
||||||
use PhpOffice\PhpWord\Exception\CopyFileException;
|
use PhpOffice\PhpWord\Exception\CopyFileException;
|
||||||
use PhpOffice\PhpWord\Exception\CreateTemporaryFileException;
|
use PhpOffice\PhpWord\Exception\CreateTemporaryFileException;
|
||||||
use PhpOffice\PhpWord\Exception\Exception;
|
use PhpOffice\PhpWord\Exception\Exception;
|
||||||
use PhpOffice\PhpWord\Shared\ZipArchive;
|
use PhpOffice\PhpWord\Shared\ZipArchive;
|
||||||
use Zend\Stdlib\StringUtils;
|
|
||||||
|
|
||||||
class TemplateProcessor
|
class TemplateProcessor
|
||||||
{
|
{
|
||||||
|
|
@ -192,7 +192,7 @@ class TemplateProcessor
|
||||||
*/
|
*/
|
||||||
protected static function ensureUtf8Encoded($subject)
|
protected static function ensureUtf8Encoded($subject)
|
||||||
{
|
{
|
||||||
if (!StringUtils::isValidUtf8($subject)) {
|
if (!Text::isUTF8($subject)) {
|
||||||
$subject = utf8_encode($subject);
|
$subject = utf8_encode($subject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue