public function __construct(array $nested_params, array $external_params) { parent::__construct($nested_params, $external_params); $this->manager = \Radio::getInstance(); if (!empty($this->nested_params['users.id'])) { $user_id = $this->nested_params['users.id']; $user = \Stb::getById($user_id); if (empty($user)) { throw new RESTNotFound("User not found"); } $this->user_id = $user['id']; } }