You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
1000 B

<?php
/**
* Refbase entry renderer
*/
abstract class RefbaseRenderer {
/// Location of refbase installation (may differ from $dbHost if using https
/// for instance)
protected $refbaseURL = "";
/**
* Constructor
*/
public function __construct() {
global $wgRefbaseURL;
$this->refbaseURL = $wgRefbaseURL;
}
/**
* Instantiation subclass instances
*/
public static function create( $outputType, $citationType = "" ) {
if ( strtolower( $outputType ) == 'cite_journal' ) {
return new RefbaseRendererCitationTemplate();
} elseif ( strtolower( $outputType ) == 'link' ) {
return new RefbaseRendererLink( $citationType );
} elseif ( strtolower( $outputType ) == 'cite' ) {
return new RefbaseRendererCite( $citationType );
} else {
return false;
}
}
/**
* Returns the list of fields to extract from the database
*/
abstract public function getFieldList();
/**
* Render entries
*/
abstract public function render( $entry, & $cite, $options );
}