| 1 | <?php |
||
| 7 | class Apps |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The container instance. |
||
| 11 | * |
||
| 12 | * @var \Illuminate\Contracts\Container\Container |
||
| 13 | */ |
||
| 14 | protected $container; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The current application identifier. |
||
| 18 | * |
||
| 19 | * @var string|null|false |
||
| 20 | */ |
||
| 21 | protected $id = false; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Create a new Apps instance. |
||
| 25 | * |
||
| 26 | * @param \Illuminate\Contracts\Container\Container $container |
||
| 27 | * @return void |
||
|
|
|||
| 28 | */ |
||
| 29 | 6 | public function __construct(Container $container) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Get or check the current application identifier. |
||
| 40 | * |
||
| 41 | * @return string|bool |
||
| 42 | */ |
||
| 43 | 3 | public function id() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * Refresh the current application identifier. |
||
| 58 | * |
||
| 59 | * @return $this |
||
| 60 | */ |
||
| 61 | 2 | public function refreshId() |
|
| 67 | |||
| 68 | /** |
||
| 69 | * Get application identifier for the given URL. |
||
| 70 | * |
||
| 71 | * @param string $url |
||
| 72 | * @return string |
||
| 73 | */ |
||
| 74 | 4 | public function idForUrl($url) |
|
| 92 | } |
||
| 93 |
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.