PHP 클래스 OpdsGenerator, BicBucStriim

파일 보기 프로젝트 열기: rvolz/BicBucStriim

공개 프로퍼티들

프로퍼티 타입 설명
$bbs_root
$bbs_version
$calibre_dir
$l10n
$updated
$xmlw

공개 메소드들

메소드 설명
__construct ( string $bbs_root, string $bbs_version, string $calibre_dir, string $calibre_modtime, object $l10n = NULL ) [__construct description]
acquisitionCatalogLink ( string $href, $rel = NULL, string $title = NULL ) Link to an OPDS acquisition catalog
authorsNamesForInitialCatalog ( $of = NULL, array $entries, string $initial ) generate a list of author entries with book counts
authorsRootCatalog ( $of = NULL, array $entries ) Generate a list of initials of author names
booksForAuthorCatalog ( $of = NULL, array $entries, string $initial, string $author, boolean $protected, integer $page, integer $next, integer $last ) generate a list of book entries for an author
booksForSeriesCatalog ( $of = NULL, array $entries, string $initial, $series, boolean $protected, integer $page, integer $next, integer $last ) generate a list of book entries for a series
booksForTagCatalog ( $of = NULL, array $entries, string $initial, string $tag, boolean $protected, integer $page, integer $next, integer $last ) generate a list of book entries for a tag
closeStream ( $of = NULL ) : string Close the XML stream and output the result
detailsLink ( string $href, string $title ) Link to a OPDS entry document with the complete book details
directDownloadLink ( string $href, string $type ) Link directly to the downloadable ressource
footer ( ) Close the OPDS feed
header ( string $title, string $subtitle, string $id, string $title_ext = '' ) Start the OPDS feed
imageLink ( string $href ) Link to a full image
indirectDownloadLink ( string $href, string $type ) Link indirectly to the downloadable ressource, to allow for authentication via HTML
link ( string $href, string $type, string $rel = NULL, string $title = NULL, string $indirectType = NULL ) Write an ATOM link
navigationCatalogLink ( string $href, $rel = NULL, string $title = NULL ) Link to an OPDS navigation catalog
navigationEntry ( string $title, string $id, string $content, string $url, $type, string $rel = 'subsection' ) Write an OPDS navigation entry
newestCatalog ( $of = NULL, array $entries, boolean $protected ) Generate an acquisition catalog for the newest books
openStream ( $of = NULL ) Open and initialize the XML stream
partialAcquisitionEntry ( array $entry, boolean $protected ) Write a catalog entry for a book title with acquisition links
rootCatalog ( $of = NULL ) : string Create the root OPDS catalog, which is a navigation catalog mentioning all available catalogs.
searchCatalog ( $of = NULL, array $entries, boolean $protected, integer $page, integer $next, integer $last, string $search, integer $total, integer $page_size ) : XML Generate a paginated acquisition catalog for books as search results
searchDescriptor ( $of = NULL, sringg $fragment ) : XML Create an OpenSearch descriptor
searchLink ( ) : xml Link to the OpenSearch document
seriesNamesForInitialCatalog ( $of = NULL, array $entries, string $initial ) generate a list of series entries with book counts
seriesRootCatalog ( $of = NULL, array $entries ) Generate a list of initials of series names
tagsNamesForInitialCatalog ( $of = NULL, array $entries, string $initial ) generate a list of tag entries with book counts
tagsRootCatalog ( $of = NULL, array $entries ) Generate a list of initials of tag names
thumbnailLink ( string $href ) Link to a thumbnail pic
titlesCatalog ( $of = NULL, array $entries, boolean $protected, integer $page, integer $next, integer $last ) Generate a paginated acquisition catalog for the all books

메소드 상세

__construct() 공개 메소드

[__construct description]
public __construct ( string $bbs_root, string $bbs_version, string $calibre_dir, string $calibre_modtime, object $l10n = NULL )
$bbs_root string Root URL for BicBucStriim, e.g. '/bbs'
$bbs_version string BBS version
$calibre_dir string calibre library dir
$calibre_modtime string Modification time of Calibre library, in ATOM format
$l10n object Initialized localization helper

authorsNamesForInitialCatalog() 공개 메소드

generate a list of author entries with book counts
public authorsNamesForInitialCatalog ( $of = NULL, array $entries, string $initial )
$entries array an array of Authors
$initial string the initial character

authorsRootCatalog() 공개 메소드

Generate a list of initials of author names
public authorsRootCatalog ( $of = NULL, array $entries )
$entries array an array of Items

booksForAuthorCatalog() 공개 메소드

generate a list of book entries for an author
public booksForAuthorCatalog ( $of = NULL, array $entries, string $initial, string $author, boolean $protected, integer $page, integer $next, integer $last )
$entries array an array of Books
$initial string the initial character
$author string the author
$protected boolean download protection y/n?
$page integer number of page to show, minimum 0
$next integer number of the next page to show, or NULL
$last integer number of the last page

booksForSeriesCatalog() 공개 메소드

generate a list of book entries for a series
public booksForSeriesCatalog ( $of = NULL, array $entries, string $initial, $series, boolean $protected, integer $page, integer $next, integer $last )
$entries array an array of Books
$initial string the initial character
$protected boolean download protection y/n?
$page integer number of page to show, minimum 0
$next integer number of the next page to show, or NULL
$last integer number of the last page

booksForTagCatalog() 공개 메소드

generate a list of book entries for a tag
public booksForTagCatalog ( $of = NULL, array $entries, string $initial, string $tag, boolean $protected, integer $page, integer $next, integer $last )
$entries array an array of Books
$initial string the initial character
$tag string the tag
$protected boolean download protection y/n?
$page integer number of page to show, minimum 0
$next integer number of the next page to show, or NULL
$last integer number of the last page

closeStream() 공개 메소드

Close the XML stream and output the result
public closeStream ( $of = NULL ) : string
리턴 string The XML string or NULL if output is sent to the URI

header() 공개 메소드

Start the OPDS feed
public header ( string $title, string $subtitle, string $id, string $title_ext = '' )
$title string OPDS feed title
$subtitle string OPDS feed subtitle
$id string feed-specific part of the id, appendend to 'urn:bicbucstriim:'
$title_ext string optional extionsion for title, not translated

navigationEntry() 공개 메소드

Write an OPDS navigation entry
public navigationEntry ( string $title, string $id, string $content, string $url, $type, string $rel = 'subsection' )
$title string title string (text)
$id string id detail, appended to 'urn:bicbucstriim:nav-'
$content string content description (text)
$url string catalog url, appended to bbs_root.'/opds'
$rel string optional relation according to OPDS spec

newestCatalog() 공개 메소드

Generate an acquisition catalog for the newest books
public newestCatalog ( $of = NULL, array $entries, boolean $protected )
$entries array an array of Book
$protected boolean true = we need password authentication before a download

openStream() 공개 메소드

Open and initialize the XML stream
public openStream ( $of = NULL )

partialAcquisitionEntry() 공개 메소드

Write a catalog entry for a book title with acquisition links
public partialAcquisitionEntry ( array $entry, boolean $protected )
$entry array the book and its details
$protected boolean true = use an indirect acquisition link, else a direct one

rootCatalog() 공개 메소드

Create the root OPDS catalog, which is a navigation catalog mentioning all available catalogs.
public rootCatalog ( $of = NULL ) : string
리턴 string if $output is a URI NULL, else the XML is returned as a string.

searchCatalog() 공개 메소드

Generate a paginated acquisition catalog for books as search results
public searchCatalog ( $of = NULL, array $entries, boolean $protected, integer $page, integer $next, integer $last, string $search, integer $total, integer $page_size ) : XML
$entries array an array of Book
$protected boolean true = we need password authentication before a download
$page integer number of page to show, minimum 0
$next integer number of the nextPage to show, or NULL
$last integer number of the last page
$search string search terms
$total integer total number of search results
$page_size integer number of entries per search page
리턴 XML stream the search result feed

searchDescriptor() 공개 메소드

Create an OpenSearch descriptor
public searchDescriptor ( $of = NULL, sringg $fragment ) : XML
$fragment sringg path fragment for search operation
리턴 XML stream the OpenSearch descriptor

seriesNamesForInitialCatalog() 공개 메소드

generate a list of series entries with book counts
public seriesNamesForInitialCatalog ( $of = NULL, array $entries, string $initial )
$entries array an array of Series
$initial string the initial character

seriesRootCatalog() 공개 메소드

Generate a list of initials of series names
public seriesRootCatalog ( $of = NULL, array $entries )
$entries array an array of Items

tagsNamesForInitialCatalog() 공개 메소드

generate a list of tag entries with book counts
public tagsNamesForInitialCatalog ( $of = NULL, array $entries, string $initial )
$entries array an array of Tags
$initial string the initial character

tagsRootCatalog() 공개 메소드

Generate a list of initials of tag names
public tagsRootCatalog ( $of = NULL, array $entries )
$entries array an array of Items

titlesCatalog() 공개 메소드

Generate a paginated acquisition catalog for the all books
public titlesCatalog ( $of = NULL, array $entries, boolean $protected, integer $page, integer $next, integer $last )
$entries array an array of Book
$protected boolean true = we need password authentication before a download
$page integer number of page to show, minimum 0
$next integer number of the next page to show, or NULL
$last integer number of the last page

프로퍼티 상세

$bbs_root 공개적으로 프로퍼티

public $bbs_root

$bbs_version 공개적으로 프로퍼티

public $bbs_version

$calibre_dir 공개적으로 프로퍼티

public $calibre_dir

$l10n 공개적으로 프로퍼티

public $l10n

$updated 공개적으로 프로퍼티

public $updated

$xmlw 공개적으로 프로퍼티

public $xmlw