Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'akrabat/hotfix/sm-registeredservices'
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDotPro committed May 18, 2012
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,4 +555,19 @@ protected function createServiceViaCallback($callable, $cName, $rName)
return $instance;
}

/**
* Retrieve a keyed list of all registered services. Handy for debugging!
*
* @return array
*/
public function getRegisteredServices()
{
return array(
'invokableClasses' => array_keys($this->invokableClasses),
'factories' => array_keys($this->factories),
'aliases' => array_keys($this->aliases),
'instances' => array_keys($this->instances),
);
}

}

0 comments on commit 42848d4

Please sign in to comment.