本文整理汇总了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();
}
示例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();
}
示例3: execute
public function execute()
{
$session = SessionFactory::create();
$session->destroy();
$view = ViewFactory::create('V_Logout');
$view->display();
exit;
}
示例4: execute
public function execute()
{
$datahandler = DatahandlerFactory::create('D_ReadAllRoles');
$data = $datahandler->getOutData();
$view = ViewFactory::create('V_SelectRoleToAssignActions');
$view->setInData($data);
$view->display();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例15: execute
public function execute()
{
//VIEW
$view = ViewFactory::create('V_LogFileLoader');
$view->display();
}