class JsController extends Controller {
protected IAppData $appData;
- protected ITimeFactory $timeFactory;
- public function __construct($appName, IRequest $request, Factory $appDataFactory, ITimeFactory $timeFactory) {
+ public function __construct(string $appName,
+ IRequest $request,
+ Factory $appDataFactory,
+ protected ITimeFactory $timeFactory) {
parent::__construct($appName, $request);
$this->appData = $appDataFactory->get('js');
- $this->timeFactory = $timeFactory;
}
/**
public const LOGIN_MSG_INVALIDPASSWORD = 'invalidpassword';
public const LOGIN_MSG_USERDISABLED = 'userdisabled';
- private IUserManager $userManager;
- private IConfig $config;
- private ISession $session;
- /** @var Session */
- private $userSession;
- private IURLGenerator $urlGenerator;
- private Defaults $defaults;
- private Throttler $throttler;
- private IInitialStateService $initialStateService;
- private WebAuthnManager $webAuthnManager;
- private IManager $manager;
- private IL10N $l10n;
-
public function __construct(?string $appName,
IRequest $request,
- IUserManager $userManager,
- IConfig $config,
- ISession $session,
- IUserSession $userSession,
- IURLGenerator $urlGenerator,
- Defaults $defaults,
- Throttler $throttler,
- IInitialStateService $initialStateService,
- WebAuthnManager $webAuthnManager,
- IManager $manager,
- IL10N $l10n) {
+ private IUserManager $userManager,
+ private IConfig $config,
+ private ISession $session,
+ private IUserSession $userSession,
+ private IURLGenerator $urlGenerator,
+ private Defaults $defaults,
+ private Throttler $throttler,
+ private IInitialStateService $initialStateService,
+ private WebAuthnManager $webAuthnManager,
+ private IManager $manager,
+ private IL10N $l10n) {
parent::__construct($appName, $request);
- $this->userManager = $userManager;
- $this->config = $config;
- $this->session = $session;
- $this->userSession = $userSession;
- $this->urlGenerator = $urlGenerator;
- $this->defaults = $defaults;
- $this->throttler = $throttler;
- $this->initialStateService = $initialStateService;
- $this->webAuthnManager = $webAuthnManager;
- $this->manager = $manager;
- $this->l10n = $l10n;
}
/**
* @package OC\Core\Controller
*/
class LostController extends Controller {
- protected IURLGenerator $urlGenerator;
- protected IUserManager $userManager;
- protected Defaults $defaults;
- protected IL10N $l10n;
protected string $from;
- protected IManager $encryptionManager;
- protected IConfig $config;
- protected IMailer $mailer;
- private LoggerInterface $logger;
- private Manager $twoFactorManager;
- private IInitialState $initialState;
- private IVerificationToken $verificationToken;
- private IEventDispatcher $eventDispatcher;
- private Limiter $limiter;
-
- public function __construct(
- string $appName,
- IRequest $request,
- IURLGenerator $urlGenerator,
- IUserManager $userManager,
- Defaults $defaults,
- IL10N $l10n,
- IConfig $config,
- string $defaultMailAddress,
- IManager $encryptionManager,
- IMailer $mailer,
- LoggerInterface $logger,
- Manager $twoFactorManager,
- IInitialState $initialState,
- IVerificationToken $verificationToken,
- IEventDispatcher $eventDispatcher,
- Limiter $limiter
- ) {
+
+ public function __construct(string $appName,
+ IRequest $request,
+ private IURLGenerator $urlGenerator,
+ private IUserManager $userManager,
+ private Defaults $defaults,
+ private IL10N $l10n,
+ private IConfig $config,
+ string $defaultMailAddress,
+ private IManager $encryptionManager,
+ private IMailer $mailer,
+ private LoggerInterface $logger,
+ private Manager $twoFactorManager,
+ private IInitialState $initialState,
+ private IVerificationToken $verificationToken,
+ private IEventDispatcher $eventDispatcher,
+ private Limiter $limiter) {
parent::__construct($appName, $request);
- $this->urlGenerator = $urlGenerator;
- $this->userManager = $userManager;
- $this->defaults = $defaults;
- $this->l10n = $l10n;
$this->from = $defaultMailAddress;
- $this->encryptionManager = $encryptionManager;
- $this->config = $config;
- $this->mailer = $mailer;
- $this->logger = $logger;
- $this->twoFactorManager = $twoFactorManager;
- $this->initialState = $initialState;
- $this->verificationToken = $verificationToken;
- $this->eventDispatcher = $eventDispatcher;
- $this->limiter = $limiter;
}
/**
use OCP\IURLGenerator;
class NavigationController extends OCSController {
- private INavigationManager $navigationManager;
- private IURLGenerator $urlGenerator;
-
- public function __construct(string $appName, IRequest $request, INavigationManager $navigationManager, IURLGenerator $urlGenerator) {
+ public function __construct(string $appName,
+ IRequest $request,
+ private INavigationManager $navigationManager,
+ private IURLGenerator $urlGenerator) {
parent::__construct($appName, $request);
- $this->navigationManager = $navigationManager;
- $this->urlGenerator = $urlGenerator;
}
/**
use OCP\IUserSession;
class OCSController extends \OCP\AppFramework\OCSController {
- private CapabilitiesManager $capabilitiesManager;
- private IUserSession $userSession;
- private IUserManager $userManager;
- private Manager $keyManager;
-
public function __construct(string $appName,
IRequest $request,
- CapabilitiesManager $capabilitiesManager,
- IUserSession $userSession,
- IUserManager $userManager,
- Manager $keyManager) {
+ private CapabilitiesManager $capabilitiesManager,
+ private IUserSession $userSession,
+ private IUserManager $userManager,
+ private Manager $keyManager) {
parent::__construct($appName, $request);
- $this->capabilitiesManager = $capabilitiesManager;
- $this->userSession = $userSession;
- $this->userManager = $userManager;
- $this->keyManager = $keyManager;
}
/**
use OCP\IRequest;
class PreviewController extends Controller {
- private ?string $userId;
- private IRootFolder $root;
- private IPreview $preview;
-
public function __construct(string $appName,
IRequest $request,
- IPreview $preview,
- IRootFolder $root,
- ?string $userId
- ) {
+ private IPreview $preview,
+ private IRootFolder $root,
+ private ?string $userId) {
parent::__construct($appName, $request);
-
- $this->preview = $preview;
- $this->root = $root;
- $this->userId = $userId;
}
/**
use OC\Profile\ProfileManager;
class ProfileApiController extends OCSController {
- private ProfileConfigMapper $configMapper;
- private ProfileManager $profileManager;
- private IUserManager $userManager;
- private IUserSession $userSession;
-
- public function __construct(
- IRequest $request,
- ProfileConfigMapper $configMapper,
- ProfileManager $profileManager,
- IUserManager $userManager,
- IUserSession $userSession
- ) {
+ public function __construct(IRequest $request,
+ private ProfileConfigMapper $configMapper,
+ private ProfileManager $profileManager,
+ private IUserManager $userManager,
+ private IUserSession $userSession) {
parent::__construct('core', $request);
- $this->configMapper = $configMapper;
- $this->profileManager = $profileManager;
- $this->userManager = $userManager;
- $this->userSession = $userSession;
}
/**
use OCP\EventDispatcher\IEventDispatcher;
class ProfilePageController extends Controller {
- private IInitialState $initialStateService;
- private ProfileManager $profileManager;
- private IShareManager $shareManager;
- private IUserManager $userManager;
- private IUserSession $userSession;
- private IUserStatusManager $userStatusManager;
- private IEventDispatcher $eventDispatcher;
-
- public function __construct(
- $appName,
- IRequest $request,
- IInitialState $initialStateService,
- ProfileManager $profileManager,
- IShareManager $shareManager,
- IUserManager $userManager,
- IUserSession $userSession,
- IUserStatusManager $userStatusManager,
- IEventDispatcher $eventDispatcher
- ) {
+ public function __construct(string $appName,
+ IRequest $request,
+ private IInitialState $initialStateService,
+ private ProfileManager $profileManager,
+ private IShareManager $shareManager,
+ private IUserManager $userManager,
+ private IUserSession $userSession,
+ private IUserStatusManager $userStatusManager,
+ private IEventDispatcher $eventDispatcher) {
parent::__construct($appName, $request);
- $this->initialStateService = $initialStateService;
- $this->profileManager = $profileManager;
- $this->shareManager = $shareManager;
- $this->userManager = $userManager;
- $this->userSession = $userSession;
- $this->userStatusManager = $userStatusManager;
- $this->eventDispatcher = $eventDispatcher;
}
/**
use OCP\IURLGenerator;
class RecommendedAppsController extends Controller {
- public IURLGenerator $urlGenerator;
- private IInitialStateService $initialStateService;
-
public function __construct(IRequest $request,
- IURLGenerator $urlGenerator,
- IInitialStateService $initialStateService) {
+ public IURLGenerator $urlGenerator,
+ private IInitialStateService $initialStateService) {
parent::__construct('core', $request);
- $this->urlGenerator = $urlGenerator;
- $this->initialStateService = $initialStateService;
}
/**
use OCP\IRequest;
class ReferenceApiController extends \OCP\AppFramework\OCSController {
- private IReferenceManager $referenceManager;
- private ?string $userId;
-
public function __construct(string $appName,
IRequest $request,
- IReferenceManager $referenceManager,
- ?string $userId) {
+ private IReferenceManager $referenceManager,
+ private ?string $userId) {
parent::__construct($appName, $request);
- $this->referenceManager = $referenceManager;
- $this->userId = $userId;
}
/**
use OCP\IRequest;
class ReferenceController extends Controller {
- private IReferenceManager $referenceManager;
- private IAppDataFactory $appDataFactory;
-
- public function __construct(string $appName, IRequest $request, IReferenceManager $referenceManager, IAppDataFactory $appDataFactory) {
+ public function __construct(string $appName,
+ IRequest $request,
+ private IReferenceManager $referenceManager,
+ private IAppDataFactory $appDataFactory) {
parent::__construct($appName, $request);
- $this->referenceManager = $referenceManager;
- $this->appDataFactory = $appDataFactory;
}
/**