本文整理匯總了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();
}