<?php


namespace AutoAdmin\Bundle\Admin\Attribute;


class PropertyAttributes
{
    private string $class;
    private array $attributes;

    public function __construct(string $class, array $attributes)
    {
        $this->class = $class;
        $this->attributes = $attributes;
    }

    public function getClass(): string
    {
        return $this->class;
    }

    public function hasAttribute(string $attributeFqcn): bool
    {
        return isset($this->attributes[$attributeFqcn]);
    }

    public function getAttribute(string $attributeFqcn): ?array
    {
        return $this->attributes[$attributeFqcn] ?? null;
    }
}
