-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apply pull requests from @h3xx to php-epub-meta
- Loading branch information
Showing
3 changed files
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,9 @@ | |
* @author Sébastien Lucas <[email protected]> | ||
*/ | ||
|
||
define('METADATA_FILE', 'META-INF/container.xml'); | ||
|
||
class EPub | ||
{ | ||
public const METADATA_FILE = 'META-INF/container.xml'; | ||
public $xml; //FIXME: change to protected, later | ||
public $toc; | ||
protected $xpath; | ||
|
@@ -38,11 +37,11 @@ public function __construct($file, $zipClass = 'clsTbsZip') | |
} | ||
|
||
// read container data | ||
if (!$this->zip->FileExists(METADATA_FILE)) { | ||
if (!$this->zip->FileExists(self::METADATA_FILE)) { | ||
throw new Exception('Unable to find metadata.xml'); | ||
} | ||
|
||
$data = $this->zip->FileRead(METADATA_FILE); | ||
$data = $this->zip->FileRead(self::METADATA_FILE); | ||
if ($data == false) { | ||
throw new Exception('Failed to access epub container data'); | ||
} | ||
|