Skip to content

Commit

Permalink
Attribute:: constants and missing annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Sep 12, 2022
1 parent 25d3077 commit 81a1df7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/Peachpie.Runtime/std/Attribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,29 @@ namespace Pchp.Core.Std
/// </summary>
[PhpType(PhpTypeAttribute.InheritName, MinimumLangVersion = "8.0"), PhpExtension("Core")]
[AttributeUsage(AttributeTargets.Class)]
[Attribute(Attribute.TARGET_CLASS)]
public sealed class Attribute : System.Attribute
{
public const int TARGET_CLASS = 1;
public const int TARGET_FUNCTION = 2;
public const int TARGET_METHOD = 4;
public const int TARGET_PROPERTY = 8;
public const int TARGET_CLASS_CONSTANT = 16;
public const int TARGET_PARAMETER = 32;
public const int TARGET_ALL = TARGET_CLASS|TARGET_FUNCTION|TARGET_METHOD|TARGET_PROPERTY|TARGET_CLASS_CONSTANT|TARGET_PARAMETER;

public const int IS_REPEATABLE = 64;

public int flags;

public Attribute(int flags = TARGET_ALL)
{
__construct(flags);
}

public void __construct(int flags = TARGET_ALL)
{
this.flags = flags;
}
}
}

0 comments on commit 81a1df7

Please sign in to comment.