gemorroj / ebook-reader
E-books reader
dev-master
2024-07-27 11:48 UTC
Requires
- php: >=8.0.2
- ext-dom: *
- ext-libxml: *
- ext-xmlreader: *
- ext-zip: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.46
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.6
This package is auto-updated.
Last update: 2024-11-27 12:27:35 UTC
README
Formats:
- EPUB
- MOBI
- FB2, FB2-ZIP
Requirements:
- PHP >= 8.0.2
- ext-zip
- ext-dom
- ext-xmlreader
Installation:
composer require gemorroj/ebook-reader
Example:
<?php use EbookReader\EbookReaderFactory; use EbookReader\Driver\Epub3Driver; $ebookReader = EbookReaderFactory::create('file.epub'); $meta = $ebookReader->getMeta(); print_r($meta); // EbookMetaInterface object $ebookReader = EbookReaderFactory::create('fake.file'); // throws UnsupportedFormatException exception $driver = new Epub3Driver('fake.file'); var_dump($driver->isValid()); // false