function annotationcommand_adapter_get_discovery

master annotationcommand_adapter.inc annotationcommand_adapter_get_discovery()

Cache the command file discovery object. @todo There probably isn't any need to cache this object.

Return value

CommandFileDiscovery

2 calls to annotationcommand_adapter_get_discovery()
annotationcommand_adapter_discover in includes/annotationcommand_adapter.inc
Search for annotation commands at the provided search path.
_drush_find_commandfiles_drush in includes/preflight.inc

File

includes/annotationcommand_adapter.inc, line 28
annotationcommand_adapter.inc

Code

function annotationcommand_adapter_get_discovery() {
  static $discovery;
  if (!isset($discovery)) {
    $discovery = new CommandFileDiscovery();
  }
  return $discovery;
}