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


PHP GetApplication函数代码示例

本文整理汇总了PHP中GetApplication函数的典型用法代码示例。如果您正苦于以下问题:PHP GetApplication函数的具体用法?PHP GetApplication怎么用?PHP GetApplication使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: GetPageList

 public function GetPageList()
 {
     $currentPageCaption = $this->GetShortCaption();
     $result = new PageList($this);
     if (GetCurrentUserGrantForDataSource('public.office_holder')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Office Holders'), 'public.office_holder.php', $this->RenderText('Office Holders'), $currentPageCaption == $this->RenderText('Office Holders')));
     }
     if (GetCurrentUserGrantForDataSource('public.office')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Political Offices'), 'public.office.php', $this->RenderText('Political Offices'), $currentPageCaption == $this->RenderText('Political Offices')));
     }
     if (GetCurrentUserGrantForDataSource('public.office_docs')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Political Office Filing Documents'), 'public.office_docs.php', $this->RenderText('Political Office Filing Documents'), $currentPageCaption == $this->RenderText('Political Office Filing Documents')));
     }
     if (GetCurrentUserGrantForDataSource('public.election_div')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Election Divisions'), 'public.election_div.php', $this->RenderText('Election Divisions'), $currentPageCaption == $this->RenderText('Election Divisions')));
     }
     if (GetCurrentUserGrantForDataSource('public.election_div_docs')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Election Division Filing Documents'), 'public.election_div_docs.php', $this->RenderText('Election Division Filing Documents'), $currentPageCaption == $this->RenderText('Election Division Filing Documents')));
     }
     if (GetCurrentUserGrantForDataSource('public.district')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Political Districts'), 'public.district.php', $this->RenderText('Political Districts'), $currentPageCaption == $this->RenderText('Political Districts')));
     }
     if (GetCurrentUserGrantForDataSource('public.office_position')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Political Office Positions'), 'public.office_position.php', $this->RenderText('Political Office Positions'), $currentPageCaption == $this->RenderText('Political Office Positions')));
     }
     if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) {
         $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, true));
     }
     return $result;
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:30,代码来源:office_holder_by_state.php

示例2: __construct

 public function __construct($name, Page $page, Dataset $dataset)
 {
     $this->name = $name;
     $this->dataset = $dataset;
     $this->page = $page;
     $this->superGlobals = GetApplication()->GetSuperGlobals();
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:7,代码来源:quick_filter.php

示例3: Render

 public function Render(Renderer $renderer)
 {
     try {
         $errorReporting = error_reporting(null);
         GetApplication()->SetOperation(OPERATION_COMMIT_DELETE);
         $this->grid->SetState(OPERATION_COMMIT_DELETE);
         $this->grid->GetState()->SetUseGetToExtractPrimaryKeys(true);
         $this->grid->ProcessMessages();
         header('Content-Type: text/xml');
         if ($this->grid->GetErrorMessage() != '') {
             $xmlWriter = XMLWriterFactory::CreateXMLWriter();
             $xmlWriter->StartDocument('1.0', 'UTF-8');
             $xmlWriter->StartElement('response');
             $xmlWriter->WriteElement('type', 'error');
             $xmlWriter->WriteElement('error_message', $this->grid->GetErrorMessage());
             $xmlWriter->EndElement('response');
             echo $xmlWriter->GetResult();
         } else {
             $xmlWriter = XMLWriterFactory::CreateXMLWriter();
             $xmlWriter->StartDocument('1.0', 'UTF-8');
             $xmlWriter->StartElement('response');
             $xmlWriter->WriteElement('type', 'OK');
             $xmlWriter->EndElement('response');
             echo $xmlWriter->GetResult();
         }
         error_reporting($errorReporting);
     } catch (Exception $e) {
         echo '<?xml version="1.0" encoding="UTF-8"?><response><type>error</type><error_message>' . htmlspecialchars($e->getMessage()) . '</error_message></response>';
     }
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:30,代码来源:modal_edit_handler.php

示例4: GetPageList

 public function GetPageList()
 {
     $currentPageCaption = $this->GetShortCaption();
     $result = new PageList($this);
     $result->AddGroup($this->RenderText('Default'));
     if (GetCurrentUserGrantForDataSource('dbo.EtatConnexion')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Dbo.EtatConnexion'), 'dbo.EtatConnexion.php', $this->RenderText('Dbo.EtatConnexion'), $currentPageCaption == $this->RenderText('Dbo.EtatConnexion'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('dbo.EvenementSysteme')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Dbo.EvenementSysteme'), 'dbo.EvenementSysteme.php', $this->RenderText('Dbo.EvenementSysteme'), $currentPageCaption == $this->RenderText('Dbo.EvenementSysteme'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('dbo.InfosFichiers')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Dbo.InfosFichiers'), 'dbo.InfosFichiers.php', $this->RenderText('Dbo.InfosFichiers'), $currentPageCaption == $this->RenderText('Dbo.InfosFichiers'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('dbo.IPClients')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Dbo.IPClients'), 'dbo.IPClients.php', $this->RenderText('Dbo.IPClients'), $currentPageCaption == $this->RenderText('Dbo.IPClients'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('dbo.MachinesClientes')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Dbo.MachinesClientes'), 'dbo.MachinesClientes.php', $this->RenderText('Dbo.MachinesClientes'), $currentPageCaption == $this->RenderText('Dbo.MachinesClientes'), false, $this->RenderText('Default')));
     }
     if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) {
         $result->AddGroup('Admin area');
         $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, false, 'Admin area'));
     }
     return $result;
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:26,代码来源:dbo.MachinesClientes.php

示例5: __construct

 /**
  * @param TableBasedUserGrantsManager $tableBasedGrantsManager
  * @param IdentityCheckStrategy $identityCheckStrategy
  */
 private function __construct($tableBasedGrantsManager, $identityCheckStrategy)
 {
     $this->tableBasedGrantsManager = $tableBasedGrantsManager;
     $this->identityCheckStrategy = $identityCheckStrategy;
     $this->router = $this->CreateAndConfigureRequestRouter();
     $this->app = GetApplication();
     $this->userIdentityStorage = new UserIdentityCookieStorage($identityCheckStrategy);
 }
开发者ID:blakeHelm,项目名称:BallotPath,代码行数:12,代码来源:user_management_request_handler.php

示例6: GetCurrentPageMode

 private function GetCurrentPageMode()
 {
     switch (GetApplication()->GetOperation()) {
         case OPERATION_VIEWALL:
             return PageMode::ViewAll;
     }
     return null;
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:8,代码来源:phpgen_admin.php

示例7: __construct

 /**
  * @param TableBasedUserGrantsManager $tableBasedGrantsManager
  * @param IdentityCheckStrategy $identityCheckStrategy
  * @param UserIdentityStorage $userIdentityStorage
  */
 private function __construct(TableBasedUserGrantsManager $tableBasedGrantsManager, IdentityCheckStrategy $identityCheckStrategy, UserIdentityStorage $userIdentityStorage)
 {
     $this->tableBasedGrantsManager = $tableBasedGrantsManager;
     $this->identityCheckStrategy = $identityCheckStrategy;
     $this->router = $this->CreateAndConfigureRequestRouter();
     $this->app = GetApplication();
     $this->userIdentityStorage = $userIdentityStorage;
 }
开发者ID:martinw0102,项目名称:ProjetSyst,代码行数:13,代码来源:user_management_request_handler.php

示例8: __construct

 /**
  * @param Grid     $grid
  * @param Captions $captions
  */
 public function __construct(Grid $grid, Captions $captions)
 {
     $this->captions = $captions;
     $this->superGlobals = GetApplication()->GetSuperGlobals();
     $this->parentGrid = $grid;
     $this->filter = new Filter($grid->GetPage()->GetContentEncoding());
     $this->generator = $this->createSQLGenerator();
     $this->fields = array();
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:13,代码来源:filter_builder_control.php

示例9: SetUpUserAuthorization

function SetUpUserAuthorization()
{
    global $usersIds;
    global $grants;
    global $appGrants;
    global $dataSourceRecordPermissions;
    $userAuthorizationStrategy = new HardCodedUserAuthorization(new UserIdentitySessionStorage(GetIdentityCheckStrategy()), new HardCodedUserGrantsManager($grants, $appGrants), $usersIds);
    GetApplication()->SetUserAuthorizationStrategy($userAuthorizationStrategy);
    GetApplication()->SetDataSourceRecordPermissionRetrieveStrategy(new HardCodedDataSourceRecordPermissionRetrieveStrategy($dataSourceRecordPermissions));
}
开发者ID:jsrxar,项目名称:dto,代码行数:10,代码来源:authorization.php

示例10: ShowSecurityErrorPage

/**
 * @param Page $parentPage
 * @param string $message
 */
function ShowSecurityErrorPage($parentPage, $message)
{
    $urlToRedirect = '';
    if ($parentPage instanceof Page) {
        $linkBuilder = $parentPage->CreateLinkBuilder();
        GetApplication()->GetSuperGlobals()->fillGetParams($linkBuilder);
        $urlToRedirect = '?redirect=' . urlencode($linkBuilder->GetLink());
    }
    $renderer = new ViewAllRenderer($parentPage->GetLocalizerCaptions());
    $errorPage = new CustomErrorPage($parentPage->GetLocalizerCaptions()->GetMessageString('AccessDenied'), $parentPage->GetContentEncoding(), $message, sprintf($parentPage->GetLocalizerCaptions()->GetMessageString('AccessDeniedErrorSuggestions'), 'login.php' . $urlToRedirect), $parentPage);
    echo $renderer->Render($errorPage);
}
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:16,代码来源:error_utils.php

示例11: GetPageList

 public function GetPageList()
 {
     $currentPageCaption = $this->GetShortCaption();
     $result = new PageList($this);
     if (GetCurrentUserGrantForDataSource('banner')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Banner Management'), 'banner.php', $this->RenderText('Banner Management'), $currentPageCaption == $this->RenderText('Banner Management')));
     }
     if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) {
         $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, true));
     }
     return $result;
 }
开发者ID:howareyoucolin,项目名称:demo,代码行数:12,代码来源:banner.php

示例12: ProcessMessages

 public function ProcessMessages()
 {
     $primaryKeysArray = array();
     for ($i = 0; $i < GetApplication()->GetPOSTValue('recordCount'); $i++) {
         if (GetApplication()->IsPOSTValueSet('rec' . $i)) {
             // TODO : move GetPrimaryKeyFieldNames function to private
             $primaryKeys = array();
             $primaryKeyNames = $this->grid->GetDataset()->GetPrimaryKeyFieldNames();
             for ($j = 0; $j < count($primaryKeyNames); $j++) {
                 $primaryKeys[] = GetApplication()->GetPOSTValue('rec' . $i . '_pk' . $j);
             }
             $primaryKeysArray[] = $primaryKeys;
         }
     }
     $inlineInsertedRecordPrimaryKeyNames = GetApplication()->GetSuperGlobals()->GetPostVariablesIf(create_function('$str', 'return StringUtils::StartsWith($str, \'inline_inserted_rec_\') && !StringUtils::Contains($str, \'pk\');'));
     foreach ($inlineInsertedRecordPrimaryKeyNames as $name => $value) {
         $primaryKeys = array();
         $primaryKeyNames = $this->grid->GetDataset()->GetPrimaryKeyFieldNames();
         for ($i = 0; $i < count($primaryKeyNames); $i++) {
             $primaryKeys[] = GetApplication()->GetSuperGlobals()->GetPostValue($name . '_pk' . $i);
         }
         $primaryKeysArray[] = $primaryKeys;
     }
     foreach ($primaryKeysArray as $primaryKeyValues) {
         $this->grid->GetDataset()->SetSingleRecordState($primaryKeyValues);
         $this->grid->GetDataset()->Open();
         if ($this->grid->GetDataset()->Next()) {
             $message = '';
             $fieldValues = $this->grid->GetDataset()->GetCurrentFieldValues();
             if ($this->CanChangeData($fieldValues, $message)) {
                 try {
                     $this->grid->GetDataset()->Delete();
                     $this->DoAfterChangeData($fieldValues);
                 } catch (Exception $e) {
                     $this->grid->GetDataset()->SetAllRecordsState();
                     $this->ChangeState(OPERATION_VIEWALL);
                     $this->SetGridErrorMessage($e);
                     return;
                 }
             } else {
                 $this->grid->GetDataset()->SetAllRecordsState();
                 $this->ChangeState(OPERATION_VIEWALL);
                 $this->SetGridSimpleErrorMessage($message);
                 return;
             }
         }
         $this->grid->GetDataset()->Close();
     }
     $this->ApplyState(OPERATION_VIEWALL);
 }
开发者ID:outsourcinggithub,项目名称:outsourcing,代码行数:50,代码来源:delete_selected_grid_state.php

示例13: ExtractPrimaryKeyValues

function ExtractPrimaryKeyValues(&$primaryKeyValues, $method = METHOD_GET)
{
    $paramNumber = 0;
    if ($method == METHOD_GET) {
        while (GetApplication()->IsGETValueSet("pk{$paramNumber}")) {
            $primaryKeyValues[] = GetApplication()->GetGETValue("pk{$paramNumber}");
            $paramNumber++;
        }
    } elseif ($method == METHOD_POST) {
        while (GetApplication()->IsPOSTValueSet("pk{$paramNumber}")) {
            $primaryKeyValues[] = GetApplication()->GetPOSTValue("pk{$paramNumber}");
            $paramNumber++;
        }
    }
}
开发者ID:howareyoucolin,项目名称:demo,代码行数:15,代码来源:common_utils.php

示例14: SetUpUserAuthorization

function SetUpUserAuthorization()
{
    global $grants;
    global $appGrants;
    global $dataSourceRecordPermissions;
    $hardCodedGrantsManager = new HardCodedUserGrantsManager($grants, $appGrants);
    $tableBasedGrantsManager = CreateTableBasedGrantsManager();
    $grantsManager = new CompositeGrantsManager();
    $grantsManager->AddGrantsManager($hardCodedGrantsManager);
    if (!is_null($tableBasedGrantsManager)) {
        $grantsManager->AddGrantsManager($tableBasedGrantsManager);
        GetApplication()->SetUserManager($tableBasedGrantsManager);
    }
    $userAuthorizationStrategy = new TableBasedUserAuthorization(new UserIdentitySessionStorage(GetIdentityCheckStrategy()), new MyPDOConnectionFactory(), GetGlobalConnectionOptions(), 'atig_users', 'user_name', 'user_id', $grantsManager);
    GetApplication()->SetUserAuthorizationStrategy($userAuthorizationStrategy);
    GetApplication()->SetDataSourceRecordPermissionRetrieveStrategy(new HardCodedDataSourceRecordPermissionRetrieveStrategy($dataSourceRecordPermissions));
}
开发者ID:eroncalli,项目名称:atig,代码行数:17,代码来源:authorization.php

示例15: GetPageList

 public function GetPageList()
 {
     $currentPageCaption = $this->GetShortCaption();
     $result = new PageList($this);
     $result->AddGroup($this->RenderText('Default'));
     if (GetCurrentUserGrantForDataSource('clienti')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Clienti'), 'clienti.php', $this->RenderText('Clienti'), $currentPageCaption == $this->RenderText('Clienti'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('articoli')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Articoli'), 'articoli.php', $this->RenderText('Articoli'), $currentPageCaption == $this->RenderText('Articoli'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('famiglie')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Famiglie'), 'famiglie.php', $this->RenderText('Famiglie'), $currentPageCaption == $this->RenderText('Famiglie'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('offerte')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Offerte'), 'offerte.php', $this->RenderText('Offerte'), $currentPageCaption == $this->RenderText('Offerte'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('listino_articoli')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Listino Articoli'), 'listino_articoli.php', $this->RenderText('Listino Articoli'), $currentPageCaption == $this->RenderText('Listino Articoli'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('voci_costo')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Voci Costo'), 'voci_costo.php', $this->RenderText('Voci Costo'), $currentPageCaption == $this->RenderText('Voci Costo'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('formule_calcolo')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Formule Calcolo'), 'formule_calcolo.php', $this->RenderText('Formule Calcolo'), $currentPageCaption == $this->RenderText('Formule Calcolo'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('listini')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Listini'), 'listini.php', $this->RenderText('Listini'), $currentPageCaption == $this->RenderText('Listini'), false, $this->RenderText('Default')));
     }
     if (GetCurrentUserGrantForDataSource('scontistica_clienti')->HasViewGrant()) {
         $result->AddPage(new PageLink($this->RenderText('Scontistica Clienti'), 'scontistica_clienti.php', $this->RenderText('Scontistica Clienti'), $currentPageCaption == $this->RenderText('Scontistica Clienti'), false, $this->RenderText('Default')));
     }
     if (HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser()) {
         $result->AddGroup('Admin area');
         $result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, false, 'Admin area'));
     }
     return $result;
 }
开发者ID:eroncalli,项目名称:atig,代码行数:38,代码来源:listini.php


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