/// <inheritdoc /> public override IEnumerable <FunctionValue> ResolveMethods(TypeValue value, PHP.Core.QualifiedName methodName, IEnumerable <FunctionValue> objectMethods) { foreach (var method in objectMethods) { //bool isstatic = (value.Declaration.ModeledMethods.Where(a => a.Key.Name == methodName.Name && a.Value.IsStatic == true).Count() > 0 || value.Declaration.SourceCodeMethods.Where(a => a.Key.Name == methodName.Name && a.Value.MethodDecl.Modifiers.HasFlag(PhpMemberAttributes.Static) == true).Count() > 0); if (method.Name.Value == methodName.Name.Value)// && isstatic == true) { if (CheckVisibility(value, method)) { yield return(method); } } } }
/// <inheritdoc /> public override void AddClassDeclaration(PHP.Core.QualifiedName name, TypeValue declaration) { classDecl.Add(name, declaration); }
/// <inheritdoc /> public override IEnumerable <TypeValue> GetClass(PHP.Core.QualifiedName className) { return(classDecl.GetValue(className)); }
/// <inheritdoc /> public override bool IsClassDefined(PHP.Core.QualifiedName className) { return(classDecl.Contains(className)); }
/// <inheritdoc /> public override void AddClassDeclaration(PHP.Core.QualifiedName name, TypeValue declaration) { classDecl.Add(name, declaration); definitionAdded = true; changeTracker.ModifiedClass(name); }
/// <summary> /// Sets the class. /// </summary> /// <param name="name">The name.</param> /// <param name="declaration">The declaration.</param> internal void SetClass(PHP.Core.QualifiedName name, TypeValue declaration) { lockedTest(); ClassDecl.Add(name, declaration); }
/// <summary> /// Gets the class. /// </summary> /// <param name="className">Name of the class.</param> /// <returns>Class with the specified name.</returns> internal IEnumerable <TypeValue> GetClass(PHP.Core.QualifiedName className) { return(ClassDecl.GetValue(className)); }
/// <summary> /// Determines whether class with specified name is defined. /// </summary> /// <param name="name">The name.</param> /// <returns>True whether class with specified name is defined.</returns> internal bool IsClassDefined(PHP.Core.QualifiedName name) { return(ClassDecl.ContainsKey(name)); }
/// <summary> /// Gets the function. /// </summary> /// <param name="functionName">Name of the function.</param> /// <returns>List of functions with given name.</returns> internal IEnumerable <FunctionValue> GetFunction(PHP.Core.QualifiedName functionName) { return(FunctionDecl.GetValue(functionName)); }
/// <summary> /// Determines whether function with given name is defined. /// </summary> /// <param name="functionName">Name of the function.</param> /// <returns>True whether function with given name is defined..</returns> internal bool IsFunctionDefined(PHP.Core.QualifiedName functionName) { return(FunctionDecl.ContainsKey(functionName)); }
/// <inheritdoc /> public abstract bool IsClassDefined(PHP.Core.QualifiedName name);
/// <inheritdoc /> public abstract bool IsFunctionDefined(PHP.Core.QualifiedName functionName);