/** * Get book metadata of contents. * * @access public * @return string */ public function getContents() { $contents = array_map(function ($content) { return '{title: \'' . addslashes($content['title']) . '\', src: \'' . $content['src'] . '\'}'; }, $this->epub->contents()); return '[' . implode(', ', $contents) . ']'; }
" media="screen" /> <script type="text/javascript"> Monocle.DEBUG = true; var bookData = { getComponents: function () { <?php echo "return [" . implode(", ", array_map(function ($comp) { return "'" . $comp . "'"; }, $book->components())) . "];"; ?> }, getContents: function () { <?php echo "return [" . implode(", ", array_map(function ($content) { return "{title: '" . addslashes($content["title"]) . "', src: '" . $content["src"] . "'}"; }, $book->contents())) . "];"; ?> }, getComponent: function (componentId) { return { url: "epubfs.php?<?php echo $add; ?> comp=" + componentId }; }, getMetaData: function(key) { return { title: "<?php echo $myBook->title; ?> ", creator: "Inventive Labs"