当前位置: 首页>>代码示例>>PHP>>正文


PHP PluginManager::Instance方法代码示例

本文整理汇总了PHP中PluginManager::Instance方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginManager::Instance方法的具体用法?PHP PluginManager::Instance怎么用?PHP PluginManager::Instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PluginManager的用法示例。


在下文中一共展示了PluginManager::Instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $this->presenter = new ManageReservationsPresenter($this, new GroupAdminManageReservationsService(new ReservationViewRepository(), new UserRepository(), new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization())), new ScheduleRepository(), new ResourceRepository(), new AttributeService(new AttributeRepository()), new UserPreferenceRepository());
     $this->SetCanUpdateResourceStatus(false);
     $this->SetPageId('manage-reservations-group-admin');
 }
开发者ID:ksdtech,项目名称:booked,代码行数:7,代码来源:manage_group_reservations.php

示例2: __construct

 /**
  * @param IReservationViewRepository $reservationViewRepository
  * @param IReservationAuthorization $authorization
  * @param IReservationHandler $reservationHandler
  * @param IUpdateReservationPersistenceService $persistenceService
  */
 public function __construct(IReservationViewRepository $reservationViewRepository, $authorization = null, $reservationHandler = null, $persistenceService = null)
 {
     $this->reservationViewRepository = $reservationViewRepository;
     $this->reservationAuthorization = $authorization == null ? new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization()) : $authorization;
     $this->persistenceService = $persistenceService == null ? new UpdateReservationPersistenceService(new ReservationRepository()) : $persistenceService;
     $this->reservationHandler = $reservationHandler == null ? ReservationHandler::Create(ReservationAction::Update, $this->persistenceService, ServiceLocator::GetServer()->GetUserSession()) : $reservationHandler;
 }
开发者ID:hugutux,项目名称:booked,代码行数:13,代码来源:ManageReservationsService.php

示例3: __construct

 /**
  *
  * @param $reservationAuthorization IReservationAuthorization
  */
 public function __construct($reservationAuthorization = null)
 {
     $this->reservationAuthorization = $reservationAuthorization;
     if (is_null($this->reservationAuthorization)) {
         $this->reservationAuthorization = new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization());
     }
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:11,代码来源:PrivacyFilter.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $userRepository = new UserRepository();
     $this->presenter = new ManageReservationsPresenter($this, new ScheduleAdminManageReservationsService(new ReservationViewRepository(), $userRepository, new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization())), new ScheduleAdminScheduleRepository($userRepository, ServiceLocator::GetServer()->GetUserSession()), new ResourceAdminResourceRepository($userRepository, ServiceLocator::GetServer()->GetUserSession()), new AttributeService(new AttributeRepository()), new UserPreferenceRepository());
     $this->SetPageId('manage-reservations-schedule-admin');
 }
开发者ID:ksdtech,项目名称:booked,代码行数:7,代码来源:ScheduleAdminManageReservationsPage.php

示例5: SetAuthentication

 /**
  * @param IWebAuthentication $authentication
  */
 private function SetAuthentication($authentication)
 {
     if (is_null($authentication)) {
         $this->authentication = new WebAuthentication(PluginManager::Instance()->LoadAuthentication(), ServiceLocator::GetServer());
     } else {
         $this->authentication = $authentication;
     }
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:11,代码来源:LoginPresenter.php

示例6: __construct

 public function __construct()
 {
     $authorization = new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization());
     $service = new CalendarSubscriptionService(new UserRepository(), new ResourceRepository(), new ScheduleRepository());
     $subscriptionValidator = new CalendarSubscriptionValidator($this, $service);
     $this->presenter = new CalendarSubscriptionPresenter($this, new ReservationViewRepository(), $subscriptionValidator, $service, new PrivacyFilter($authorization));
     parent::__construct('', 1);
 }
开发者ID:hugutux,项目名称:booked,代码行数:8,代码来源:AtomSubscriptionPage.php

示例7: Approve

 /**
  * @param IReservationApprovalPage $approvePage
  * @param UserSession $userSession
  * @return ReservationApprovalPresenter
  */
 public function Approve(IReservationApprovalPage $approvePage, UserSession $userSession)
 {
     $persistenceFactory = new ReservationPersistenceFactory();
     $approveAction = ReservationAction::Approve;
     $handler = ReservationHandler::Create($approveAction, $persistenceFactory->Create($approveAction), $userSession);
     $auth = new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization());
     return new ReservationApprovalPresenter($approvePage, $persistenceFactory->Create($approveAction), $handler, $auth, $userSession);
 }
开发者ID:ksdtech,项目名称:booked,代码行数:13,代码来源:ReservationPresenterFactory.php

示例8: __construct

 public function __construct()
 {
     parent::__construct('MyCalendar', 0);
     $userRepository = new UserRepository();
     $subscriptionService = new CalendarSubscriptionService($userRepository, new ResourceRepository(), new ScheduleRepository());
     $resourceRepository = new ResourceRepository();
     $resourceService = new ResourceService($resourceRepository, PluginManager::Instance()->LoadPermission(), new AttributeService(new AttributeRepository()), $userRepository);
     $this->presenter = new PersonalCalendarPresenter($this, new ReservationViewRepository(), new CalendarFactory(), $subscriptionService, $userRepository, $resourceService, new ScheduleRepository());
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:9,代码来源:PersonalCalendarPage.php

示例9: __construct

 public function __construct()
 {
     parent::__construct('ResourceCalendar');
     $resourceRepository = new ResourceRepository();
     $scheduleRepository = new ScheduleRepository();
     $userRepository = new UserRepository();
     $resourceService = new ResourceService($resourceRepository, PluginManager::Instance()->LoadPermission(), new AttributeService(new AttributeRepository()), $userRepository);
     $subscriptionService = new CalendarSubscriptionService($userRepository, $resourceRepository, $scheduleRepository);
     $privacyFilter = new PrivacyFilter(new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization()));
     $this->_presenter = new CalendarPresenter($this, new CalendarFactory(), new ReservationViewRepository(), $scheduleRepository, $resourceService, $subscriptionService, $privacyFilter);
 }
开发者ID:hugutux,项目名称:booked,代码行数:11,代码来源:CalendarPage.php

示例10: PageLoad

 public function PageLoad()
 {
     if (Configuration::Instance()->GetKey(ConfigKeys::DISABLE_PASSWORD_RESET, new BooleanConverter()) || !PluginManager::Instance()->LoadAuthentication()->ShowForgotPasswordPrompt()) {
         $this->_page->SetEnabled(false);
         return;
     }
     if ($this->_page->ResetClicked()) {
         $this->SendRandomPassword();
         $this->_page->ShowResetEmailSent(true);
     }
 }
开发者ID:hugutux,项目名称:booked,代码行数:11,代码来源:ForgotPwdPresenter.php

示例11: __construct

 public function __construct($user = null, $privacyFilter = null, $attributeRepository = null)
 {
     $this->user = $user;
     if ($this->user == null) {
         $this->user = ServiceLocator::GetServer()->GetUserSession();
     }
     $this->privacyFilter = $privacyFilter;
     if ($this->privacyFilter == null) {
         $this->privacyFilter = new PrivacyFilter(new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization()));
     }
     $this->attributeRepository = $attributeRepository;
     if ($this->attributeRepository == null) {
         $this->attributeRepository = new AttributeRepository();
     }
 }
开发者ID:JoseTfg,项目名称:Booked,代码行数:15,代码来源:SlotLabelFactory.php

示例12: PageLoad

 public function PageLoad()
 {
     $this->page->SetAllowedActions(PluginManager::Instance()->LoadAuthentication());
     if ($this->page->ResettingPassword()) {
         $this->LoadValidators();
         if ($this->page->IsValid()) {
             $user = $this->GetUser();
             $password = $this->page->GetPassword();
             $encrypted = $this->passwordEncryption->EncryptPassword($password);
             $user->ChangePassword($encrypted->EncryptedPassword(), $encrypted->Salt());
             $this->userRepository->Update($user);
             $this->page->ShowResetPasswordSuccess(true);
         }
     }
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:15,代码来源:PasswordPresenter.php

示例13: PageLoad

 public function PageLoad()
 {
     try {
         $reservationAction = ReservationAction::Approve;
         $factory = new ReservationPersistenceFactory();
         $persistenceService = $factory->Create($reservationAction);
         $handler = ReservationHandler::Create($reservationAction, $persistenceService, ServiceLocator::GetServer()->GetUserSession());
         $auth = new ReservationAuthorization(PluginManager::Instance()->LoadAuthorization());
         $presenter = new ReservationApprovalPresenter($this, $persistenceService, $handler, $auth, ServiceLocator::GetServer()->GetUserSession());
         $presenter->PageLoad();
     } catch (Exception $ex) {
         Log::Error('ReservationApprovalPage - Critical error saving reservation: %s', $ex);
         $this->Display('Ajax/reservation/reservation_error.tpl');
     }
 }
开发者ID:hugutux,项目名称:booked,代码行数:15,代码来源:ReservationApprovalPage.php

示例14: PageLoad

 public function PageLoad()
 {
     $userSession = ServiceLocator::GetServer()->GetUserSession();
     Log::Debug('ProfilePresenter loading user %s', $userSession->UserId);
     $user = $this->userRepository->LoadById($userSession->UserId);
     $this->page->SetUsername($user->Username());
     $this->page->SetFirstName($user->FirstName());
     $this->page->SetLastName($user->LastName());
     $this->page->SetEmail($user->EmailAddress());
     $this->page->SetTimezone($user->Timezone());
     $this->page->SetHomepage($user->Homepage());
     $this->page->SetPhone($user->GetAttribute(UserAttribute::Phone));
     $this->page->SetOrganization($user->GetAttribute(UserAttribute::Organization));
     $this->page->SetPosition($user->GetAttribute(UserAttribute::Position));
     $userId = $userSession->UserId;
     $attributes = $this->attributeService->GetAttributes(CustomAttributeCategory::USER, $userId);
     $this->page->SetAttributes($attributes->GetAttributes($userId));
     $this->PopulateTimezones();
     $this->PopulateHomepages();
     $this->page->SetAllowedActions(PluginManager::Instance()->LoadAuthentication());
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:21,代码来源:ProfilePresenter.php

示例15: __construct

 public function __construct()
 {
     parent::__construct('AccountActivation');
     $userRepo = new UserRepository();
     $this->_presenter = new ActivationPresenter($this, new AccountActivation($userRepo, $userRepo), new WebAuthentication(PluginManager::Instance()->LoadAuthentication()));
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:6,代码来源:ActivationPage.php


注:本文中的PluginManager::Instance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。