Package fr.adrienbrault.idea.symfony2plugin.stubs.dict

Examples of fr.adrienbrault.idea.symfony2plugin.stubs.dict.StubIndexedRoute


                if((keySet.contains("path") || keySet.contains("pattern")) && keySet.contains("defaults")) {
                    // cleanup: 'foo', "foo"
                    String keyText = StringUtils.strip(StringUtils.strip(yamlKeyValue.getKeyText(), "'"), "\"");
                    if(StringUtils.isNotBlank(keyText)) {
                        StubIndexedRoute route = new StubIndexedRoute(keyText);

                        String routePath = YamlHelper.getYamlKeyValueAsString((YAMLCompoundValue) element, "path", false);
                        if(routePath == null) {
                            routePath = YamlHelper.getYamlKeyValueAsString((YAMLCompoundValue) element, "pattern", false);
                        }

                        if(routePath != null && StringUtils.isNotBlank(routePath)) {
                            route.setPath(routePath);
                        }

                        String controller = getYamlController(yamlKeyValue);
                        if(controller != null) {
                            route.setController(controller);
                        }

                        indexedRoutes.add(route);
                    }
                }
View Full Code Here


                        XmlAttribute xmlAttribute = servicesTag.getAttribute("id");
                        if(xmlAttribute != null) {
                            String attrValue = xmlAttribute.getValue();
                            if(StringUtils.isNotBlank(attrValue)) {

                                StubIndexedRoute e = new StubIndexedRoute(attrValue);
                                XmlAttribute pathAttribute = servicesTag.getAttribute("path");
                                if(pathAttribute == null) {
                                    pathAttribute = servicesTag.getAttribute("pattern");
                                }

                                if(pathAttribute != null) {
                                    String pathValue = pathAttribute.getValue();
                                    if(pathValue != null && StringUtils.isNotBlank(pathValue)) {
                                        e.setPath(pathValue);
                                    }
                                }

                                for(XmlTag subTag :servicesTag.getSubTags()) {
                                    if("default".equalsIgnoreCase(subTag.getName())) {
                                        XmlAttribute xmlAttr = subTag.getAttribute("key");
                                        if(xmlAttr != null && "_controller".equals(xmlAttr.getValue())) {
                                            String actionName = subTag.getValue().getTrimmedText();
                                            if(StringUtils.isNotBlank(actionName)) {
                                                e.setController(actionName);
                                            }
                                        }
                                    }
                                }
View Full Code Here

TOP

Related Classes of fr.adrienbrault.idea.symfony2plugin.stubs.dict.StubIndexedRoute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.