if(name.equals("service")) {
// service/argument[id]
XmlAttribute classAttribute = parentXmlTag.getAttribute("class");
if(classAttribute != null) {
String serviceDefName = classAttribute.getValue();
PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), serviceDefName);
// check type hint on constructor
if(phpClass != null) {
Method constructor = phpClass.getConstructor();
if(constructor != null) {
String serviceName = ((XmlAttributeValue) psiElement).getValue();
attachMethodInstances(psiElement, serviceName, constructor, getArgumentIndex(currentXmlTag), holder);
}
}
}
} else if (name.equals("call")) {
// service/call/argument[id]
XmlAttribute methodAttribute = parentXmlTag.getAttribute("method");
if(methodAttribute != null) {
String methodName = methodAttribute.getValue();
XmlTag serviceTag = parentXmlTag.getParentTag();
// get service class
if(serviceTag != null && "service".equals(serviceTag.getName())) {
XmlAttribute classAttribute = serviceTag.getAttribute("class");
if(classAttribute != null) {
String serviceDefName = classAttribute.getValue();
PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), serviceDefName);
// finally check method type hint
if(phpClass != null) {
Method method = PhpElementsUtil.getClassMethod(phpClass, methodName);