1 | <?php |
||
9 | class SymLink extends Node |
||
10 | { |
||
11 | /** |
||
12 | * The endpoint of the link |
||
13 | * |
||
14 | * @var string |
||
15 | **/ |
||
16 | private $endpoint; |
||
17 | |||
18 | /** |
||
19 | * Constructor |
||
20 | * |
||
21 | * @param string $from endpoint (what the link points to) |
||
22 | * @param string $to used as $name for Node |
||
23 | * @return void |
||
|
|||
24 | **/ |
||
25 | public function __construct($from, $to) |
||
31 | |||
32 | /** |
||
33 | * Get the endpoint of the link |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getEndpoint() |
||
41 | |||
42 | /** |
||
43 | * Set the endpoint of the link |
||
44 | * |
||
45 | * @param string $endpoint |
||
46 | * @return SymLink |
||
47 | */ |
||
48 | public function setEndpoint($endpoint) |
||
54 | } |
||
55 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.