/**
* Finds the resources for a given binding type.
*
* @param string $typeName The type name.
*
* @return string[] An array of short resource class names indexed by
* the resource path.
*/
private function findByBindingType($typeName)
{
$matches = array();
$expr = Expr::isInstanceOf('Puli\\Discovery\\Binding\\ResourceBinding');
foreach ($this->discovery->findBindings($typeName, $expr) as $binding) {
/** @var ResourceBinding $binding */
foreach ($binding->getResources() as $resource) {
$matches[$resource->getPath()] = StringUtil::getShortClassName(get_class($resource));
}
}
ksort($matches);
return $matches;
}