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


PHP ViewFactory::create方法代码示例

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


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

示例1: execute

 public function execute()
 {
     //SESSION
     $session = SessionFactory::create();
     $date = $session->get("selected-date");
     //VALIDATION
     $validator = ValidatorFactory::create();
     $validator->ifTrue($date == null)->respond(INCOMPLETE_FILTER_DATA);
     //SESSION DATA
     $sessionData = array('date' => $date);
     //PARAMETERS
     $params = RequestParametersFactory::create();
     $pageNumber = $params->get('page-number');
     $rowsPerPage = $params->get('rows-per-page');
     //PAGINATOR
     $paginator = PaginatorFactory::create();
     $paginator->pageNumber = $pageNumber;
     $datahandler = DatahandlerFactory::create('D_ClientRequestsRowsTotalNumber');
     $datahandler->setInData($sessionData);
     $rowsTotalNumber = $datahandler->getOutData();
     //Always force a single page
     $paginator->rowsPerPage = $rowsTotalNumber;
     //DATAHANDLERS
     $datahandler = DatahandlerFactory::create('D_FrequencyTableOfClientRequests');
     $datahandler->setInData($sessionData);
     $data = $datahandler->getOutData();
     //VALIDATION
     $validator->ifTrue($data == array())->respond('No activity for the day: ' . $date);
     //PAGINATOR
     $paginator->rowsTotalNumber = $rowsTotalNumber;
     //VIEW
     $view = ViewFactory::create('V_FrequencyTableOfClientRequests');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:35,代码来源:A_FrequencyTableOfClientRequests.php

示例2: execute

 public function execute()
 {
     //PARAMETERS
     $params = RequestParametersFactory::create();
     $roleId = $params->get('selected-role-id');
     $pageNumber = $params->get('page-number');
     $rowsPerPage = $params->get('rows-per-page');
     //PAGINATOR
     $paginator = PaginatorFactory::create();
     $paginator->pageNumber = $pageNumber;
     $datahandler = DatahandlerFactory::create('D_ActionsRowsTotalNumber');
     $actionsRowsTotalNumber = $datahandler->getOutData();
     $paginator->rowsPerPage = $actionsRowsTotalNumber;
     //Always force a single page
     $paginator->rowsPerPage = $actionsRowsTotalNumber;
     //SESSION
     $session = SessionFactory::create();
     $session->set('selected-role-id', $roleId);
     //DATAHANDLER
     $datahandler = DatahandlerFactory::create('D_ReadActionsWithStatus');
     $datahandler->setInData($roleId);
     $roleActions = $datahandler->getOutData();
     //DATAHANDLER
     $datahandler = DatahandlerFactory::create('D_ReadRoleById');
     $datahandler->setInData($roleId);
     $roleData = $datahandler->getOutData();
     //SESSION
     $session->set('selected-role-name', $roleData['name']);
     $data = array('role-actions' => $roleActions, 'role-name' => $roleData['name']);
     //VIEW
     $view = ViewFactory::create('V_ReadActionsWithStatus');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:34,代码来源:A_ReadActionsWithStatus.php

示例3: execute

 public function execute()
 {
     $session = SessionFactory::create();
     $session->destroy();
     $view = ViewFactory::create('V_Logout');
     $view->display();
     exit;
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:8,代码来源:A_Logout.php

示例4: execute

 public function execute()
 {
     $datahandler = DatahandlerFactory::create('D_ReadAllRoles');
     $data = $datahandler->getOutData();
     $view = ViewFactory::create('V_SelectRoleToAssignActions');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:8,代码来源:A_SelectRoleToAssignActions.php

示例5: execute

 public function execute()
 {
     $params = RequestParametersFactory::create();
     $name = $params->get('search-target');
     $datahandler = DatahandlerFactory::create('D_SearchUsersByName');
     $datahandler->setInData($name);
     $data = $datahandler->getOutData();
     $view = ViewFactory::create('V_ReadAllUsers');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:11,代码来源:A_SearchUsersByName.php

示例6: execute

 public function execute()
 {
     //DATAHANDLER
     $datahandler = DatahandlerFactory::create('D_ReadClientIps');
     $clientIps = $datahandler->getOutData();
     $datahandler = DatahandlerFactory::create('D_ReadDates');
     $dates = $datahandler->getOutData();
     $data = array("client-ips" => $clientIps, "dates" => $dates);
     //VIEW
     $view = ViewFactory::create('V_EnterFilterDataForm');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:13,代码来源:A_EnterFilterDataForm.php

示例7: execute

 public function execute()
 {
     $params = RequestParametersFactory::create();
     $id = $params->get('role-id');
     // $validator = ValidatorFactory::create();
     // $validator->ifFalse(is_integer($id))->respond(NOT_VALID_ID);
     $session = SessionFactory::create();
     $session->set('role-id', $id);
     $datahandler = DatahandlerFactory::create('D_ReadRoleById');
     $datahandler->setInData($id);
     $data = $datahandler->getOutData();
     $view = ViewFactory::create('V_UpdateRoleForm');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:15,代码来源:A_UpdateRoleForm.php

示例8: execute

 public function execute()
 {
     //PARAMETERS
     $params = RequestParametersFactory::create();
     //SESSION
     $session = SessionFactory::create();
     $datahandler = DatahandlerFactory::create('D_SearchActionsByName');
     $data = array('selected-role-id' => $session->get('selected-role-id'), 'search-action-name' => $params->get('search-target'));
     $datahandler->setInData($data);
     $roleActions = $datahandler->getOutData();
     $data = array('role-actions' => $roleActions, 'role-name' => $session->get('selected-role-name'));
     $view = ViewFactory::create('V_ReadActionsWithStatus');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:15,代码来源:A_SearchActionsByName.php

示例9: execute

 public function execute()
 {
     $params = RequestParametersFactory::create();
     $id = $params->get('user-id');
     $validator = ValidatorFactory::create();
     $validator->ifTrue($id == "1")->respond(NOT_DELETE_ADMIN);
     $session = SessionFactory::create();
     $session->set('user-id', $id);
     $datahandler = DatahandlerFactory::create('D_ReadUserById');
     $datahandler->setInData($id);
     $data = $datahandler->getOutData();
     $view = ViewFactory::create('V_DeleteUserConfirmation');
     $view->setInData($data);
     $view->display();
     unset($datahandler, $view);
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:16,代码来源:A_DeleteUserConfirmation.php

示例10: execute

 public function execute()
 {
     //PARAMETERS
     $params = RequestParametersFactory::create();
     $pageNumber = $params->get('page-number');
     $rowsPerPage = $params->get('rows-per-page');
     $paginator = PaginatorFactory::create();
     $paginator->pageNumber = $pageNumber;
     $paginator->rowsPerPage = $rowsPerPage;
     //DATAHANDLERS
     $datahandler = DatahandlerFactory::create('D_ReadRolesPaginated');
     $roles = $datahandler->getOutData();
     $datahandler = DatahandlerFactory::create('D_RolesRowsTotalNumber');
     $roleRowsTotalNumber = $datahandler->getOutData();
     $paginator->rowsTotalNumber = $roleRowsTotalNumber;
     //VIEW
     $view = ViewFactory::create('V_ReadRolesPaginated');
     $view->setInData(array("roles" => $roles));
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:20,代码来源:A_ReadRolesPaginated.php

示例11: execute

 public function execute()
 {
     //SESSION
     $session = SessionFactory::create();
     $date = $session->get("selected-date");
     //VALIDATION
     $validator = ValidatorFactory::create();
     $validator->ifTrue($date == null)->respond(INCOMPLETE_FILTER_DATA);
     //SESSION DATA
     $sessionData = array('date' => $date);
     //DATAHANDLER
     $datahandler = DatahandlerFactory::create('D_ClientRequestVerticalBarPlot');
     $datahandler->setInData($sessionData);
     $data = $datahandler->getOutData();
     //VALIDATION
     $validator->ifTrue($data == array())->respond('No activity for the day: ' . $date);
     //VIEW
     $view = ViewFactory::create('V_ClientRequestVerticalBarPlot');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:21,代码来源:A_ClientRequestVerticalBarPlot.php

示例12: execute

 public function execute()
 {
     //PARAMETERS
     $params = RequestParametersFactory::create();
     $userId = $params->get('selected-user-id');
     //SESSION
     $session = SessionFactory::create();
     $session->set('selected-user-id', $userId);
     //DATAHANDLER
     $datahandler = DatahandlerFactory::create('D_ReadRolesWithStatus');
     $datahandler->setInData($userId);
     $userRoles = $datahandler->getOutData();
     //DATAHANDLER
     $datahandler = DatahandlerFactory::create('D_ReadUserById');
     $datahandler->setInData($userId);
     $userData = $datahandler->getOutData();
     $data = array('user-roles' => $userRoles, 'user-name' => $userData['name']);
     //VIEW
     $view = ViewFactory::create('V_ReadRolesWithStatus');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:22,代码来源:A_ReadRolesWithStatus.php

示例13: execute

 public function execute()
 {
     //PARAMETERS
     $params = RequestParametersFactory::create();
     $pageNumber = $params->get('page-number');
     $rowsPerPage = $params->get('rows-per-page');
     //PAGINATOR
     $paginator = PaginatorFactory::create();
     $paginator->pageNumber = $pageNumber;
     $paginator->rowsPerPage = 10;
     //DATAHANDLERS
     $datahandler = DatahandlerFactory::create('D_ReadAllSquidData');
     $data = $datahandler->getOutData();
     $datahandler = DatahandlerFactory::create('D_SquidDataRowsTotalNumber');
     $rowsTotalNumber = $datahandler->getOutData();
     //PAGINATOR
     $paginator->rowsTotalNumber = $rowsTotalNumber;
     //VIEW
     $view = ViewFactory::create('V_ReadAllSquidData');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:22,代码来源:A_ReadAllSquidData.php

示例14: execute

 public function execute()
 {
     //SESSION
     $session = SessionFactory::create();
     $clientIp = $session->get("selected-client-ip");
     $date = $session->get("selected-date");
     //VALIDATION
     $validator = ValidatorFactory::create();
     $validator->ifTrue($clientIp == null or $date == null)->respond(INCOMPLETE_FILTER_DATA);
     //SESSION DATA
     $sessionData = array('client-ip' => $clientIp, 'date' => $date);
     //DATAHANDLER
     $datahandler = DatahandlerFactory::create('D_ClientDataLineChart');
     $datahandler->setInData($sessionData);
     $data = $datahandler->getOutData();
     //VALIDATION
     $validator->ifTrue($data == array())->respond('Client: ' . $clientIp . ' no activity in the day: ' . $date);
     //VIEW
     $view = ViewFactory::create('V_ClientDataLineChart');
     $view->setInData($data);
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:22,代码来源:A_ClientDataLineChart.php

示例15: execute

 public function execute()
 {
     //VIEW
     $view = ViewFactory::create('V_LogFileLoader');
     $view->display();
 }
开发者ID:argosback,项目名称:statistical-log-analizer,代码行数:6,代码来源:A_LogFileLoader.php


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