| 1 | <?php |
||
| 7 | class Http |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Application Object |
||
| 11 | * |
||
| 12 | * @var \System\Application |
||
| 13 | */ |
||
| 14 | private $app; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Constructor |
||
| 18 | * |
||
| 19 | * @param \System\Application $app |
||
| 20 | */ |
||
| 21 | public function __construct(Application $app) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Return https or http |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function requestProtocol() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Check if the website is secure |
||
| 38 | * |
||
| 39 | * @return bool |
||
| 40 | */ |
||
| 41 | private function isSecure() |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Check if HTTPS is 'on' |
||
| 51 | * |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | private function checkHttp() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Check if HTTP_X_FORWARDED_PROTO is not empty or 'https' |
||
| 64 | * |
||
| 65 | * @return bool |
||
| 66 | */ |
||
| 67 | private function checkHttpXforwardedProto() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Check if HTTP_X_FORWARDED_SSL is 'on' |
||
| 77 | * |
||
| 78 | * @return bool |
||
| 79 | */ |
||
| 80 | private function checkHttpXforwardedSsl() |
||
| 87 | } |
||
| 88 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.