# packeta/1.6.1/deps/nette/php-generator/src/PhpGenerator/Attribute.php

Packeta, version 1.6.1. 38 lines.

- Page: https://pluginprobe.com/plugins/packeta/1.6.1/code/deps/nette/php-generator/src/PhpGenerator/Attribute.php
- Raw: https://pluginprobe.com/plugins/packeta/1.6.1/raw/deps/nette/php-generator/src/PhpGenerator/Attribute.php
- Modified: 2023-08-30T08:36:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/packeta/1.6.1/code/deps/nette/php-generator/src/PhpGenerator/Attribute.php#L10-L20`.

```php
<?php

/**
 * This file is part of the Nette Framework (https://nette.org)
 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 */
declare (strict_types=1);
namespace Packetery\Nette\PhpGenerator;

use Packetery\Nette;
/**
 * PHP Attribute.
 */
final class Attribute
{
    use \Packetery\Nette\SmartObject;
    /** @var string */
    private $name;
    /** @var array */
    private $args;
    public function __construct(string $name, array $args)
    {
        if (!Helpers::isNamespaceIdentifier($name)) {
            throw new \Packetery\Nette\InvalidArgumentException("Value '{$name}' is not valid attribute name.");
        }
        $this->name = $name;
        $this->args = $args;
    }
    public function getName() : string
    {
        return $this->name;
    }
    public function getArguments() : array
    {
        return $this->args;
    }
}

```
