1 | <?php |
||
7 | class Expression extends QueryExpression |
||
8 | { |
||
9 | /** |
||
10 | * The value of the expression. |
||
11 | * |
||
12 | * @var mixed |
||
13 | */ |
||
14 | protected $value; |
||
15 | |||
16 | /** |
||
17 | * Create a new raw query expression. |
||
18 | * |
||
19 | * @param mixed $value |
||
20 | * @return void |
||
|
|||
21 | */ |
||
22 | 3 | public function __construct($value) |
|
26 | |||
27 | /** |
||
28 | * Get the value of the expression. |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | 1 | public function __toString() |
|
36 | |||
37 | /** |
||
38 | * Get the value of the expression. |
||
39 | * |
||
40 | * @return mixed |
||
41 | */ |
||
42 | 3 | public function getValue() |
|
46 | } |
||
47 |
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.