for (Object o : currentClass.getSuperClasses().getChilds()) {
if (o instanceof FullyQualifiedReference) {
FullyQualifiedReference superReference = (FullyQualifiedReference) o;
String ns = getUseStatement(superReference.getName());
if (ns != null) {
String fqcn = ns + "\\" + superReference.getName();
boolean isTestOrFixture = false;
if (namespace != null && namespace.getName() != null) {
isTestOrFixture = namespace.getName().contains("Test") || namespace.getName().contains("Fixtures");
}
// we got a bundle definition, index it
if (fqcn.equals(SymfonyCoreConstants.BUNDLE_FQCN) && ! isTestOrFixture) {
int length = (currentClass.sourceEnd() - currentClass.sourceEnd());
JSONObject meta = JsonUtils.createBundle(sourceModule, currentClass, namespace);
ReferenceInfo info = new ReferenceInfo(ISymfonyModelElement.BUNDLE, currentClass.sourceStart(), length, currentClass.getName(), meta.toJSONString(), namespace.getName());
requestor.addReference(info);
}
}
//TODO: Check against an implementation of Symfony\Component\DependencyInjection\ContainerAwareInterface
//
// see http://symfony.com/doc/current/cookbook/bundles/best_practices.html#controllers
// and http://api.symfony.com/2.0/Symfony/Component/DependencyInjection/ContainerAwareInterface.html
if (superReference.getName().equals(SymfonyCoreConstants.CONTROLLER_CLASS)) {
inController = true;
// the ControllerIndexer does the actual work of parsing the
// the relevant elements inside the controller
// which are then being collected in the endVisit() method
controllerIndexer = new TemplateVariableVisitor(useStatements, namespace, sourceModule);