1 | <?php |
||
19 | class ReflectedReturn { |
||
20 | |||
21 | const STRICT_TYPE_HINT = 1; |
||
22 | const DOC_TYPE_HINT = 2; |
||
23 | const ESTIMATED_TYPE_HINT = 3; |
||
24 | const VALUE_UNKNOW = 'unknown'; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $value = self::VALUE_UNKNOW; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $type; |
||
35 | |||
36 | /** |
||
37 | * @var int |
||
38 | */ |
||
39 | private $mode = self::ESTIMATED_TYPE_HINT; |
||
40 | |||
41 | /** |
||
42 | * @param null $type |
||
43 | * @param string $value |
||
44 | * @param int $mode |
||
45 | */ |
||
46 | public function __construct($type = null, $value = self::VALUE_UNKNOW, $mode = self::ESTIMATED_TYPE_HINT) |
||
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getValue() |
||
60 | |||
61 | /** |
||
62 | * @param string $value |
||
63 | * @return ReflectedReturn |
||
64 | */ |
||
65 | public function setValue($value) |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getType() |
||
78 | |||
79 | /** |
||
80 | * @param string $type |
||
81 | * @return ReflectedReturn |
||
82 | */ |
||
83 | public function setType($type) |
||
88 | |||
89 | /** |
||
90 | * @return int |
||
91 | */ |
||
92 | public function getMode() |
||
96 | |||
97 | /** |
||
98 | * @param int $mode |
||
99 | * @return ReflectedReturn |
||
100 | */ |
||
101 | public function setMode($mode) |
||
106 | |||
107 | }; |