Example #1
0
 /**
  * Loads book infos from an epub file
  *
  * @param string Epub full file name
  * @throws Exception if error
  *
  * @return void
  */
 public function LoadFromEpub($inFileName)
 {
     // Load the epub file
     $ePub = new EPub($inFileName, 'ZipFile');
     // Get the epub infos
     $this->mFormat = 'epub';
     $this->mPath = pathinfo($inFileName, PATHINFO_DIRNAME);
     $this->mName = pathinfo($inFileName, PATHINFO_FILENAME);
     $this->mUuid = $ePub->Uuid();
     $this->mUri = $ePub->Uri();
     $this->mTitle = $ePub->Title();
     $this->mAuthors = $ePub->Authors();
     $this->mLanguage = $ePub->Language();
     $this->mDescription = $ePub->Description();
     $this->mSubjects = $ePub->Subjects();
     $cover = $ePub->Cover();
     $this->mCover = $cover['found'] !== false ? $cover['found'] : '';
     $this->mIsbn = $ePub->ISBN();
     $this->mRights = $ePub->Copyright();
     $this->mPublisher = $ePub->Publisher();
     $this->mSerie = $ePub->Serie();
     $this->mSerieIndex = $ePub->SerieIndex();
     $this->mCreationDate = $ePub->CreationDate();
     $this->mModificationDate = $ePub->ModificationDate();
 }