Examples of PhpClass


Examples of com.jetbrains.php.lang.psi.elements.PhpClass

        }

        for(QueryBuilderJoin join: qb.getJoinMap().values()) {
            String className = join.getResolvedClass();
            if(className != null) {
                PhpClass phpClass = PhpElementsUtil.getClassInterface(project, className);
                if(phpClass != null) {
                    qb.addPropertyAlias(join.getAlias(), new QueryBuilderPropertyAlias(join.getAlias(), null, new DoctrineModelField(join.getAlias()).addTarget(phpClass).setTypeName(phpClass.getPresentableFQN())));

                    // add entity properties
                    for(DoctrineModelField field: EntityHelper.getModelFields(phpClass)) {
                        qb.addPropertyAlias(join.getAlias() + "." + field.getName(), new QueryBuilderPropertyAlias(join.getAlias(), field.getName(), field));
                    }
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

        if (!(object instanceof PhpClass)) {
            return;
        }

        StringBuilder textToInsertBuilder = new StringBuilder();
        PhpClass aClass = (PhpClass)object;
        String fqn = aClass.getNamespaceName();

        if(fqn.startsWith("\\")) {
            fqn = fqn.substring(1);
        }
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

        parameter = PhpTypeProviderUtil.getResolvedParameter(phpIndex, parameter);
        if(parameter == null) {
            return phpNamedElementCollections;
        }

        PhpClass phpClass = EntityHelper.resolveShortcutName(project, parameter);
        if(phpClass == null) {
            return phpNamedElementCollections;
        }

        return Arrays.asList(phpClass);
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

        if(parameter == null) {
            return Arrays.asList(phpNamedElement);
        }

        // @TODO: parse xml or yml for repositoryClass?
        PhpClass phpClass = EntityHelper.getEntityRepositoryClass(project, parameter);

        // self add :)
        if(phpClass == null) {
            return phpNamedElementCollections;
        }
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

                        // @TODO: remove nested on Annotation plugin update
                        if(phpDocAttrList != null) {
                            if(phpDocAttrList.getNode().getElementType() == PhpDocElementTypes.phpDocAttributeList) {
                                PhpPsiElement phpPsiElement = phpDocAttrList.getFirstPsiChild();
                                if(phpPsiElement instanceof StringLiteralExpression) {
                                    PhpClass phpClass = de.espend.idea.php.annotation.util.PhpElementsUtil.getClassInsideAnnotation(((StringLiteralExpression) phpPsiElement));
                                    if(phpClass != null) {
                                        List<DoctrineModelField> lists = EntityHelper.getModelFields(phpClass);
                                        if(lists.size() > 0) {
                                            return new PsiReference[] {
                                                new EntityReference((StringLiteralExpression) element, lists)
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

    public static Set<String> getAnnotations(Project project, String className) {

        HashSet<String> map = new HashSet<String>();

        PhpClass phpClass = PhpElementsUtil.getClass(project, className);
        if(phpClass == null) {
            return map;
        }

        for(Field field: phpClass.getFields()) {
            if(!field.isConstant()) {
                map.add(field.getName());
            }
        }
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

        return results.toArray(new PsiElement[results.size()]);
    }

    private void getClassGoto(PsiElement psiElement, List<PsiElement> results) {
        String text = PsiElementUtils.trimQuote(psiElement.getText());
        PhpClass phpClass = PhpElementsUtil.getClassInterface(psiElement.getProject(), text);
        if(phpClass != null) {
            results.add(phpClass);
        }

    }
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

        YAMLKeyValue classKeyValue = PsiElementUtils.getChildrenOfType(yamlCompoundValue, PlatformPatterns.psiElement(YAMLKeyValue.class).withName("class"));
        if(classKeyValue == null) {
            return;
        }

        PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), classKeyValue.getValueText());
        if(phpClass != null) {
            for(Method method: PhpElementsUtil.getClassPublicMethod(phpClass)) {
                if(method.getName().equals(PsiElementUtils.trimQuote(psiElement.getText()))) {
                    results.add(method);
                }
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

        YAMLKeyValue classKeyValue = PsiElementUtils.getChildrenOfType(psiElement, PlatformPatterns.psiElement(YAMLKeyValue.class).withName(classTag));
        if(classKeyValue == null) {
            return;
        }

        PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), classKeyValue.getValueText());
        if(phpClass != null) {
            PhpElementsUtil.addClassPublicMethodCompletion(completionResultSet, phpClass);
        }
    }
View Full Code Here

Examples of com.jetbrains.php.lang.psi.elements.PhpClass

                return;
            }

            String value = YamlHelper.getYamlKeyValueAsString(yamlCompoundValue, "class", true);
            if(value != null) {
                PhpClass phpClass = ServiceUtil.getResolvedClassDefinition(psiElement.getProject(), value);
                if(phpClass != null) {
                    FormUtil.attachFormAliasesCompletions(phpClass, completionResultSet);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.