Skip to content

"\PhpOffice\PhpWord\Shared\File" class was cut out. #171

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

Merged
1 commit merged into from Mar 25, 2014
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions src/PhpWord/Reader/Word2007.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\DocumentProperties;
use PhpOffice\PhpWord\Exceptions\Exception;
use PhpOffice\PhpWord\Shared\File;

/**
* Reader for Word2007
Expand Down Expand Up @@ -87,7 +86,7 @@ public function getFromZipArchive($archive, $fileName = '', $removeNamespace = f
if (strpos($fileName, '//') !== false) {
$fileName = substr($fileName, strpos($fileName, '//') + 1);
}
$fileName = File::realpath($fileName);
$fileName = realpath($fileName);

// Apache POI fixes
$contents = $archive->getFromName($fileName);
Expand Down
77 changes: 0 additions & 77 deletions src/PhpWord/Shared/File.php

This file was deleted.

3 changes: 1 addition & 2 deletions src/PhpWord/Writer/ODText/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

use PhpOffice\PhpWord\Exceptions\Exception;
use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Shared\File;
use PhpOffice\PhpWord\Shared\XMLWriter;

/**
Expand Down Expand Up @@ -123,7 +122,7 @@ public function writeManifest(PhpWord $phpWord = null)
*/
private function _getImageMimeType($pFile = '')
{
if (File::fileExists($pFile)) {
if (file_exists($pFile)) {
$image = getimagesize($pFile);
return image_type_to_mime_type($image[2]);
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/PhpWord/Writer/Word2007/ContentTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
namespace PhpOffice\PhpWord\Writer\Word2007;

use PhpOffice\PhpWord\Exceptions\Exception;
use PhpOffice\PhpWord\Shared\File;
use PhpOffice\PhpWord\Shared\XMLWriter;

/**
Expand Down Expand Up @@ -189,7 +188,7 @@ public function writeContentTypes($_imageTypes, $_objectTypes, $_cHdrs, $footers
*/
private function _getImageMimeType($pFile = '')
{
if (File::fileExists($pFile)) {
if (file_exists($pFile)) {
$image = getimagesize($pFile);
return image_type_to_mime_type($image[2]);
} else {
Expand Down
42 changes: 0 additions & 42 deletions tests/PhpWord/Tests/Shared/FileTest.php

This file was deleted.