コード例 #1
0
 /// <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);
             }
         }
     }
 }
コード例 #2
0
 /// <inheritdoc />
 public override void AddClassDeclaration(PHP.Core.QualifiedName name, TypeValue declaration)
 {
     classDecl.Add(name, declaration);
 }
コード例 #3
0
 /// <inheritdoc />
 public override IEnumerable <TypeValue> GetClass(PHP.Core.QualifiedName className)
 {
     return(classDecl.GetValue(className));
 }
コード例 #4
0
 /// <inheritdoc />
 public override bool IsClassDefined(PHP.Core.QualifiedName className)
 {
     return(classDecl.Contains(className));
 }
コード例 #5
0
 /// <inheritdoc />
 public override void AddClassDeclaration(PHP.Core.QualifiedName name, TypeValue declaration)
 {
     classDecl.Add(name, declaration);
     definitionAdded = true;
     changeTracker.ModifiedClass(name);
 }
コード例 #6
0
        /// <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);
        }
コード例 #7
0
 /// <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));
 }
コード例 #8
0
 /// <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));
 }
コード例 #9
0
 /// <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));
 }
コード例 #10
0
 /// <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));
 }
コード例 #11
0
 /// <inheritdoc />
 public abstract bool IsClassDefined(PHP.Core.QualifiedName name);
コード例 #12
0
 /// <inheritdoc />
 public abstract bool IsFunctionDefined(PHP.Core.QualifiedName functionName);