MDL-20438 Refactoring pluginlib before adding anything new

These changes are motivated by feedback from Tim Hunt (17 October 2011
in the developers chat room). The combination of using an interface, but
then putting all the useful information in public fields, was not good
design of this library. So I am merging the plugin_information interface
and the plugintype_base class into a new abstract class plugininfo_base.
This new class defines the basic API of all information holding
subclasses. This does not change the code, just puts the documentation
closer to the methods they are actually implemented.
This commit is contained in:
David Mudrak
2012-03-30 11:05:39 +02:00
parent a280078197
commit b6ad85946d
2 changed files with 128 additions and 294 deletions
+2 -2
View File
@@ -594,12 +594,12 @@ class core_admin_renderer extends plugin_renderer_base {
/**
* Formats the information that needs to go in the 'Requires' column.
* @param plugin_information $plugin the plugin we are rendering the row for.
* @param plugininfo_base $plugin the plugin we are rendering the row for.
* @param plugin_manager $pluginman provides data on all the plugins.
* @param string $version
* @return string HTML code
*/
protected function required_column(plugin_information $plugin, plugin_manager $pluginman, $version) {
protected function required_column(plugininfo_base $plugin, plugin_manager $pluginman, $version) {
$requires = array();
if (!empty($plugin->versionrequires)) {