Skip to content

Commit

Permalink
Method for listing enabled components
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Oct 8, 2010
1 parent b5b9c12 commit 63abb08
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/component.php
Expand Up @@ -5,5 +5,9 @@ public function get($component);

public function is_installed($component);

public function get_components();

public function get_routes(midgardmvc_core_request $request);

public function inject(midgardmvc_core_request $request, $injector_type);
}
10 changes: 10 additions & 0 deletions providers/component/midgardmvc.php
Expand Up @@ -74,6 +74,16 @@ public function is_installed($component)
return false;
}

public function get_components()
{
$components = array();
foreach ($this->components_enabled as $component => $data)
{
$components[] = $this->get($component);
}
return $components;
}

public function get_routes(midgardmvc_core_request $request)
{
$routes = array();
Expand Down

0 comments on commit 63abb08

Please sign in to comment.