_public = attributes.getNamedItem("public").getNodeValue();
}
if (phpClass != null && id != null) {
Service _service = null;
if (phpClass.startsWith("%") && phpClass.endsWith("%")) {
String placeHolder = phpClass.replace("%", "");
Iterator it = getParameters().keySet().iterator();
while (it.hasNext()) {
String key = (String) it.next();
String val = (String) getParameters().get(key);
if (placeHolder.equals(key)) {
_service = new Service(id, val, null);
}
}
} else {
_service = new Service(id, phpClass, null);
}
NodeList children = childNode.getChildNodes();
List<Node> tags = new ArrayList<Node>();
List<Node> arguments = new ArrayList<Node>();
List<Node> calls = new ArrayList<Node>();
for (int j=0; j < children.getLength(); j++) {
Node child = children.item(j);
if ("tag".equals(child.getNodeName())) {
tags.add(child);
} else if ("argument".equals(child.getNodeName())) {
arguments.add(child);
} else if ("call".equals(child.getNodeName())) {
calls.add(child);
}
}
if (_service != null) {
_service.setPublic(_public);
_service.setLine(Integer.parseInt((String) childNode.getUserData("lineNumber")));
for(Node tag : tags) {
NamedNodeMap map = tag.getAttributes();
Node tagName = map.getNamedItem("name");
if (tagName != null && tagName.getNodeValue() != null) {
_service.addTag(tagName.getNodeValue());
}
}
}
synchronized (services) {