_data = new JObject();
//get plugin info
jimport( 'joomla.event.helper' );
$this->_data->plugin = & JPluginHelper::getPlugin( 'system', 'dump' );
if( empty($this->_data->plugin) ) {
$mainframe->enqueueMessage( 'To use J!Dump, the Dump plugin has to be installed and published.' );
}
parent::__construct();
}
function & getPlugin() {
return $this->_data->plugin;
}
function & getReadme() {
return $this->_getFile( 'readme.php' );
}
function & getChangelog() {
return $this->_getFile( 'changelog.php' );
}
function & getInstallation() {
return $this->_getFile( 'installation.php' );
}
function & _getFile( $filename ){
ob_start();
include( JPATH_COMPONENT_ADMINISTRATOR.DS.$filename );
$file = ob_get_clean();
$file = nl2br( $file );
return $file;
}
}