PhpParser\Node\Stmt\UseUse::__construct PHP Method

__construct() public method

Constructs an alias (use) node.
public __construct ( Name $name, null | string $alias = null, integer $type = Use_::TYPE_UNKNOWN, array $attributes = [] )
$name PhpParser\Node\Name Namespace/Class to alias
$alias null | string Alias
$type integer Type of the use element (for mixed group use declarations only)
$attributes array Additional attributes
    public function __construct(Node\Name $name, $alias = null, $type = Use_::TYPE_UNKNOWN, array $attributes = array())
    {
        if (null === $alias) {
            $alias = $name->getLast();
        }
        parent::__construct($attributes);
        $this->type = $type;
        $this->name = $name;
        $this->alias = $alias;
    }