mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-02 17:38:19 +01:00
35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace PhpParser\Node;
|
||
|
|
||
|
use PhpParser\NodeAbstract;
|
||
|
|
||
|
/**
|
||
|
* @property string $name Name
|
||
|
* @property null|Expr $default Default value
|
||
|
* @property null|string|Name $type Typehint
|
||
|
* @property bool $byRef Whether is passed by reference
|
||
|
*/
|
||
|
class Param extends NodeAbstract
|
||
|
{
|
||
|
/**
|
||
|
* Constructs a parameter node.
|
||
|
*
|
||
|
* @param string $name Name
|
||
|
* @param null|Expr $default Default value
|
||
|
* @param null|string|Name $type Typehint
|
||
|
* @param bool $byRef Whether is passed by reference
|
||
|
* @param array $attributes Additional attributes
|
||
|
*/
|
||
|
public function __construct($name, $default = null, $type = null, $byRef = false, array $attributes = array()) {
|
||
|
parent::__construct(
|
||
|
array(
|
||
|
'name' => $name,
|
||
|
'default' => $default,
|
||
|
'type' => $type,
|
||
|
'byRef' => $byRef
|
||
|
),
|
||
|
$attributes
|
||
|
);
|
||
|
}
|
||
|
}
|