Package com.jetbrains.php.lang.psi.elements

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


        return isCallTo(e, expectedMethods, 1);
    }

    protected boolean isCallTo(Method e, Method[] expectedMethods) {

        PhpClass methodClass = e.getContainingClass();
        if(methodClass == null) {
            return false;
        }

        for (Method expectedMethod : expectedMethods) {

            // @TODO: its stuff from beginning times :)
            if(expectedMethod == null) {
                continue;
            }

            PhpClass containingClass = expectedMethod.getContainingClass();
            if (containingClass != null && expectedMethod.getName().equals(e.getName()) && isInstanceOf(methodClass, containingClass)) {
                return true;
            }
        }
View Full Code Here


        Method method = getMultiResolvedMethod(psiReference);
        if (method == null) {
            return false;
        }

        PhpClass methodClass = method.getContainingClass();
        if(methodClass == null) {
            return false;
        }

        for (Method expectedMethod : expectedMethods) {

            // @TODO: its stuff from beginning times :)
            if(expectedMethod == null) {
                continue;
            }

            PhpClass containingClass = expectedMethod.getContainingClass();
            if (null != containingClass && expectedMethod.getName().equals(method.getName()) && isInstanceOf(methodClass, containingClass)) {
                return true;
            }
        }
View Full Code Here

        return isImplementationOfInterface(phpClass.getSuperClass(), phpInterface);
    }

    public boolean isInstanceOf(PhpClass subjectClass, String expectedClass) {

        PhpClass instanceClass = PhpElementsUtil.getClassInterface(subjectClass.getProject(), expectedClass);

        if(instanceClass == null) {
            return false;
        }
View Full Code Here

    }

    public boolean isInstanceOf(Project project, String subjectClass, String expectedClass) {

        PhpClass subjectPhpClass = PhpElementsUtil.getClassInterface(project, subjectClass);
        if(subjectPhpClass == null) {
            return false;
        }

        return isInstanceOf(subjectPhpClass, expectedClass);
View Full Code Here

  }

  public SmartJumper(AnActionEvent e, OpenType openType) throws Exception {
    super(e, openType);
    if (this.fileSystem.getIdentifier() == CakeIdentifier.Controller) {
      PhpClass phpClass = PsiTreeUtil.getChildOfType(psiFile.getFirstChild(), PhpClass.class);
      if (phpClass != null) {
        this.controllerMethod = new ControllerMethod(phpClass, editor.getCaretModel().getOffset());
      }
    } else if (this.fileSystem.getIdentifier() == CakeIdentifier.View) {
      this.viewMethod = new ViewMethod(psiFile);
View Full Code Here

TOP

Related Classes of com.jetbrains.php.lang.psi.elements.PhpClass

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.