PHP Class PHPePub\Core\Structure\Opf

Author: A. Grandt ([email protected])
Mostrar archivo Open project: grandt/phpepub

Public Properties

Property Type Description
$date
$guide Guide
$manifest Manifest
$metadata Metadata
$namespaces
$prefixes
$spine Spine

Public Methods

Method Description
__construct ( string $ident = "BookId", string $bookVersion = EPub::BOOK_VERSION_EPUB2 ) Class constructor.
__destruct ( ) : void Class destructor
addColaborator ( string $name, string $fileAs = null, string $role = null ) Enter description here .
addCreator ( string $name, string $fileAs = null, string $role = null ) Enter description here .
addDCMeta ( string $name, string $value ) Enter description here .
addItem ( string $id, string $href, string $mediaType, string $properties = null ) Enter description here .
addItemRef ( string $idref, boolean $linear = true ) Enter description here .
addMeta ( string $name, string $content ) Add a meta value to the metadata.
addMetaProperty ( string $name, string $content ) Add a Meta property value to the metadata
addMetaValue ( PHPePub\Core\Structure\OPF\MetaValue $value )
addNamespace ( string $nsName, string $nsURI )
addPrefix ( string $name, string $URI )
addReference ( string $type, string $title, string $href ) Enter description here .
finalize ( ) : string Enter description here .
getItemByHref ( string $href, boolean $startsWith = false ) : boolean | array | Item
getItemById ( string $id ) : boolean | Item
initialize ( string $title, string $language, string $identifier, string $identifierScheme ) Enter description here .
isEPubVersion2 ( )
setIdent ( string $ident = "BookId" ) Enter description here .
setVersion ( $bookVersion ) Enter description here .

Method Details

__construct() public method

Class constructor.
public __construct ( string $ident = "BookId", string $bookVersion = EPub::BOOK_VERSION_EPUB2 )
$ident string
$bookVersion string

__destruct() public method

Class destructor
public __destruct ( ) : void
return void

addColaborator() public method

..
public addColaborator ( string $name, string $fileAs = null, string $role = null )
$name string
$fileAs string
$role string Use the MarcCode constants

addCreator() public method

..
public addCreator ( string $name, string $fileAs = null, string $role = null )
$name string
$fileAs string
$role string Use the MarcCode constants

addDCMeta() public method

..
public addDCMeta ( string $name, string $value )
$name string
$value string

addItem() public method

..
public addItem ( string $id, string $href, string $mediaType, string $properties = null )
$id string
$href string
$mediaType string
$properties string

addItemRef() public method

..
public addItemRef ( string $idref, boolean $linear = true )
$idref string
$linear boolean

addMeta() public method

Meta values in the metadata looks like:
public addMeta ( string $name, string $content )
$name string
$content string

addMetaProperty() public method

Properties in the metadata looks like: value Remember to add the namespace as well.
public addMetaProperty ( string $name, string $content )
$name string property name, including the namespace declaration, ie. "dcterms:modified"
$content string

addMetaValue() public method

public addMetaValue ( PHPePub\Core\Structure\OPF\MetaValue $value )
$value PHPePub\Core\Structure\OPF\MetaValue

addNamespace() public method

public addNamespace ( string $nsName, string $nsURI )
$nsName string
$nsURI string

addPrefix() public method

public addPrefix ( string $name, string $URI )
$name string
$URI string

addReference() public method

..
public addReference ( string $type, string $title, string $href )
$type string
$title string
$href string

finalize() public method

..
public finalize ( ) : string
return string

getItemByHref() public method

public getItemByHref ( string $href, boolean $startsWith = false ) : boolean | array | Item
$href string
$startsWith boolean
return boolean | array | PHPePub\Core\Structure\OPF\Item Item if the href is found, else FALSE. If $startsWith is true, the returned object will be an array if any are found.

getItemById() public method

public getItemById ( string $id ) : boolean | Item
$id string
return boolean | PHPePub\Core\Structure\OPF\Item Item if the id is found, else FALSE

initialize() public method

..
public initialize ( string $title, string $language, string $identifier, string $identifierScheme )
$title string
$language string
$identifier string
$identifierScheme string

isEPubVersion2() public method

public isEPubVersion2 ( )

setIdent() public method

..
public setIdent ( string $ident = "BookId" )
$ident string

setVersion() public method

..
public setVersion ( $bookVersion )
$bookVersion

Property Details

$date public_oe property

public $date

$guide public_oe property

Guide
public $guide

$manifest public_oe property

Manifest
public $manifest

$metadata public_oe property

Metadata
public $metadata

$namespaces public_oe property

public $namespaces

$prefixes public_oe property

public $prefixes

$spine public_oe property

Spine
public $spine