| 1 | <?php |
||
| 15 | class GetUsers extends ChatAPI { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var $userMapper \OCA\Chat\OCH\Db\UserMapper |
||
| 19 | */ |
||
| 20 | private $userMapper; |
||
| 21 | |||
| 22 | public function __construct( |
||
| 23 | Chat $app, |
||
| 24 | UserMapper $userMapper |
||
| 25 | ){ |
||
| 26 | $this->app = $app; |
||
|
|
|||
| 27 | $this->userMapper = $userMapper; |
||
| 28 | } |
||
| 29 | |||
| 30 | /* |
||
| 31 | * @param $requestData['user'] String user id of the client |
||
| 32 | * @param $requestData['convid'] String session_id of the client |
||
| 33 | */ |
||
| 34 | public function setRequestData(array $requestData){ |
||
| 37 | |||
| 38 | public function execute(){ |
||
| 52 | } |
||
| 53 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: