| 1 | <?php |
||
| 10 | class Copy implements Contents |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The source file |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | **/ |
||
| 17 | private $from; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The source file |
||
| 21 | * |
||
| 22 | * @param string $from |
||
| 23 | * @return void |
||
|
|
|||
| 24 | **/ |
||
| 25 | public function __construct($from) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Get the contents |
||
| 32 | * |
||
| 33 | * @return string |
||
| 34 | **/ |
||
| 35 | public function getContents() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get the source file |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | public function getFrom() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Set the source file |
||
| 69 | * |
||
| 70 | * @param string $from |
||
| 71 | * @return Copy |
||
| 72 | */ |
||
| 73 | public function setFrom($from) |
||
| 79 | } |
||
| 80 |
Adding a
@returnannotation 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.