1 | <?php |
||
16 | class File extends AccessRights |
||
17 | { |
||
18 | /** |
||
19 | * Contents of the file |
||
20 | * |
||
21 | * @var ContentGenerator |
||
22 | **/ |
||
23 | private $contentGenerator; |
||
24 | |||
25 | /** |
||
26 | * Constructor |
||
27 | * |
||
28 | * @param string $name |
||
29 | * @param ContentGenerator|string $contents |
||
30 | * @param int $mode mode in octal 0XXX |
||
31 | * @return void |
||
|
|||
32 | **/ |
||
33 | public function __construct($name, $contents = '', $mode = null) |
||
39 | |||
40 | /** |
||
41 | * Get the contents as a string |
||
42 | * |
||
43 | * @param array[string]string $parameters |
||
44 | * @return string |
||
45 | **/ |
||
46 | public function getContents(array $parameters = array()) |
||
59 | |||
60 | /** |
||
61 | * Get the content generator |
||
62 | * |
||
63 | * @return ContentGenerator |
||
64 | */ |
||
65 | public function getContentGenerator() |
||
69 | |||
70 | /** |
||
71 | * Set the content generator |
||
72 | * |
||
73 | * @param ContentGenerator $contentGenerator |
||
74 | * @return File |
||
75 | */ |
||
76 | public function setContentGenerator($contentGenerator) |
||
90 | } |
||
91 |
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.