1 | <?php |
||
30 | class PhpParameter extends AbstractModel implements ValueInterface { |
||
31 | |||
32 | use NamePart; |
||
33 | use TypePart; |
||
34 | use ValuePart; |
||
35 | |||
36 | private $passedByReference = false; |
||
37 | |||
38 | /** |
||
39 | * Creates a new PHP parameter. |
||
40 | * |
||
41 | * @param string $name the parameter name |
||
42 | * @return static |
||
43 | */ |
||
44 | 17 | public static function create($name = null) { |
|
47 | |||
48 | /** |
||
49 | * Creates a new PHP parameter |
||
50 | * |
||
51 | * @param string $name the parameter name |
||
52 | */ |
||
53 | 28 | public function __construct($name = null) { |
|
56 | |||
57 | /** |
||
58 | * Sets whether this parameter is passed by reference |
||
59 | * |
||
60 | * @param bool $bool `true` if passed by reference and `false` if not |
||
61 | * @return $this |
||
62 | */ |
||
63 | 8 | public function setPassedByReference($bool) { |
|
68 | |||
69 | /** |
||
70 | * Returns whether this parameter is passed by reference |
||
71 | * |
||
72 | * @return bool `true` if passed by reference and `false` if not |
||
73 | */ |
||
74 | 11 | public function isPassedByReference() { |
|
77 | |||
78 | /** |
||
79 | * Returns a docblock tag for this parameter |
||
80 | * |
||
81 | * @return ParamTag |
||
82 | */ |
||
83 | 7 | public function getDocblockTag() { |
|
89 | |||
90 | /** |
||
91 | * Alias for setDescription() |
||
92 | * |
||
93 | * @see #setDescription |
||
94 | * @param string $description |
||
95 | * @return $this |
||
96 | */ |
||
97 | 4 | public function setTypeDescription($description) { |
|
100 | |||
101 | /** |
||
102 | * Alias for getDescription() |
||
103 | * |
||
104 | * @see #getDescription |
||
105 | * @return string |
||
106 | */ |
||
107 | 9 | public function getTypeDescription() { |
|
110 | } |
||
111 |