Commit 12a0a684 authored by Nigel McNie's avatar Nigel McNie
Browse files

(#3404) Stop type hinting with LeapExport, that class doesn't exist.



On PHP 5.1, this was causing a fatal error when it was hit.

On PHP 5.2 or greater, this causes an E_RECOVERABLE_ERROR. Due to a bug
in Mahara's error handler, such errors were being squashed so we never
saw them. Whoops!
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 420ccdd9
......@@ -41,7 +41,7 @@ class LeapExportElementInternal extends LeapExportElement {
protected $artefacts = array();
public function __construct(LeapExporter $exporter, array $artefacts) {
public function __construct(PluginExportLeap $exporter, array $artefacts) {
parent::__construct(null, $exporter);
$this->artefacts = $artefacts;
$this->assign_smarty_vars();
......
......@@ -45,7 +45,7 @@ class LeapExportElementContactinformation extends LeapExportElement {
* export plugin to be exported as persondata
*/
class LeapExportElementPersonalinformation extends LeapExportElement {
public function __construct(ArtefactType $artefact, LeapExporter $exporter) {
public function __construct(ArtefactType $artefact, PluginExportLeap $exporter) {
parent::__construct($artefact, $exporter);
$c = $this->artefact->get('composites');
$persondata = array();
......@@ -129,7 +129,7 @@ class LeapExportElementResumeComposite extends LeapExportElement {
protected $composites;
protected $children = array();
public function __construct(ArtefactType $artefact, LeapExporter $exporter) {
public function __construct(ArtefactType $artefact, PluginExportLeap $exporter) {
parent::__construct($artefact, $exporter);
$this->set_composites();
}
......@@ -202,7 +202,7 @@ abstract class LeapExportElementResumeCompositeChild extends LeapExportElement {
protected $originalrecord;
protected $parentartefact;
public function __construct(ArtefactTypeResumeComposite $parentartefact, LeapExporter $exporter, $child) {
public function __construct(ArtefactTypeResumeComposite $parentartefact, PluginExportLeap $exporter, $child) {
$this->originalrecord = $child;
$this->entrydata = $this->record_to_entrydata($child);
$this->parentartefact = $parentartefact;
......
......@@ -441,9 +441,9 @@ class LeapExportElement {
* constructor.
*
* @param ArtefactType $artefact artefact this element represents
* @param LeapExporter $exporter the exporter object
* @param PluginExportLeap $exporter the exporter object
*/
public function __construct(ArtefactType $artefact, LeapExporter $exporter) {
public function __construct(ArtefactType $artefact=null, PluginExportLeap $exporter=null) {
$this->artefact = $artefact;
$this->exporter = $exporter;
$this->smarty = smarty_core();
......@@ -727,7 +727,7 @@ abstract class LeapExportArtefactPlugin {
protected $exporter;
protected $artefacts;
public function __construct(LeapExporter $exporter, array $artefacts) {
public function __construct(PluginExportLeap $exporter, array $artefacts) {
$this->exporter = $exporter;
$this->artefacts = $artefacts;
}
......@@ -744,9 +744,6 @@ abstract class LeapExportArtefactPlugin {
/**
* export xml for the subclass.
*
* @param LeapExporter $exporter the exporter object. Can be used to fetch smarty object.
* @param array $artefacts the array of selected artefacts that belong to this plugin
*
* @return XML string
*/
abstract public function get_export_xml();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment