Extracts the name of the page and the action to perform with it from HTTP request data

@return array     first element is page name, second is action name
185472
public function getActionName()
    {
        if (is_array($this->actionName)) {
            return $this->actionName;
        }
        if (empty($this->pages)) {
            throw new HTML_QuickForm2_NotFoundException('No pages added to the form');
        }
        $names = array_map('preg_quote', array_keys($this->pages));
        $regex = '/^_qf_(' . implode('|', $names) . ')_(.+?)(_x)?$/';
        foreach (array_keys($_REQUEST) as $key) {
            if (preg_match($regex, $key, $matches)) {
                $this->actionName = array($matches[1], $matches[2]);
                break;
            }
        }
        if (!is_array($this->actionName)) {
            reset($this->pages);
            $this->actionName = array(key($this->pages), 'display');
        }
        return $this->actionName;
    }
64875
protected function getPageLogin()
    {
        $this->debug('Controller and action changed to: ' . implode("/", $this->pageLogin));
        if (isset($this->pageLogin[3]))
            $this->request()->setModule($this->pageLogin[3]);
        if (isset($this->pageLogin[2]) && is_string($this->pageLogin[2]))
            $this->request()->setModule($this->pageLogin[2]);
        elseif (isset($this->pageLogin[2]) && is_array($this->pageLogin[2]) && !empty($this->pageLogin[2]))
            $this->request()->setParams($this->pageLogin[2]);
        $this->request()->setController($this->pageLogin[0]);
        $this->request()->setAction($this->pageLogin[1]);
        return $this->getControllerClassFromNameAndModule($this->pageLogin[0], $this->request()->getModule());
    }
781947
public function getRouteName()
    {
        if ($this->is_page) {
            return $this->alias;
        }

        return str_replace('category-', '', $this->category->getRouteName() . '.' . $this->alias);
    }
841413
public function getAction() {
		if ($this->action) {
			return $this->action;
		} else {
			$action = "index";
			switch ($_SERVER['REQUEST_METHOD']) {
				case "GET":
					if (count($this->getFilterParameters()) == 0) {
						$action = "index";
					} else {
						$action = "get";
					}
					break;
				case "POST":
					$action = "post";
					break;
				case "PUT":
					$action = "put";
					break;
				case "DELETE":
					$action = "delete";
					break;
				case "HEAD":
					$action = "head";
					break;
				case "SEARCH":
					$action = "search";
					break;
				case "OPTIONS":
					$action = "options";
					break;
			}

			return $action;
		}
	}
409392
public function getRouteInfo()
    {
        if ($this->isSingle()) {
            if (isset($this->containers['route_info']) && ($controller = $this->containers['route_info']->get('controller')) 
                && ($action = $this->containers['route_info']->get('action'))
            ) {
                return ['controller' => $controller, 'action' => $action];
            }
        }
        return ['controller' => 'index', 'action' => 'index'];
    }
546237
public function getPage() {
    $page = $this->traverse($this->pageMap, Server::getRequestUriParts());
    if ($page === null) {
      return null;
    }
    return $this->createWebPageFromClassName($page);
  }
888425
public function getNames()
    {
        $this->write("Loading set list... ");

        // On the first pass through the following loop, we want to get the
        // first page of sets without using a resumption token:
        $params = [];

        $setNames = [];

        // Grab set information until we have it all (at which point we will
        // break out of this otherwise-infinite loop):
        do {
            // Process current page of results:
            $response = $this->sendRequest('ListSets', $params);
            if (isset($response->ListSets->set)) {
                foreach ($response->ListSets->set as $current) {
                    $spec = (string)$current->setSpec;
                    $name = (string)$current->setName;
                    if (!empty($spec)) {
                        $setNames[$spec] = $name;
                    }
                }
            }

            // Is there a resumption token?  If so, continue looping; if not,
            // we're done!
            $params['resumptionToken']
                = !empty($response->ListSets->resumptionToken)
                ? (string)$response->ListSets->resumptionToken : '';
        } while (!empty($params['resumptionToken']));
        $this->writeLine("found " . count($setNames));
        return $setNames;
    }
383194
public function getPageTypeName()
    {
        if (!isset($this->pageType)) {
            $this->pageType = $this->getPageTypeObject();
        }
        if (is_object($this->pageType)) {
            return $this->pageType->getPageTypeDisplayName();
        }
    }
1127021
protected function _getPageVariables()
    {
        $table = $this->_table();
        $controller = $this->_controller();
        $scope = $this->_action()->getConfig('scope');

        $data = [
            'modelClass' => $controller->modelClass,
            'singularHumanName' => Inflector::humanize(Inflector::underscore(Inflector::singularize($controller->modelClass))),
            'pluralHumanName' => Inflector::humanize(Inflector::underscore($controller->getName())),
            'singularVar' => Inflector::singularize($controller->getName()),
            'pluralVar' => Inflector::variable($controller->getName()),
        ];

        try {
            $data += [
                'modelSchema' => $table->getSchema(),
                'displayField' => $table->getDisplayField(),
                'primaryKey' => $table->getPrimaryKey(),
            ];
        } catch (Exception $e) {
            // May be empty if there is no table object for the action
        }

        if ($scope === 'entity') {
            $data += [
                'primaryKeyValue' => $this->_primaryKeyValue()
            ];
        }

        return $data;
    }
80032
protected function getActionText()
    {
        if ($this->hasBeenSent()) {
            $action = 'action_sent';
        } elseif ($this->isSendingPrevented()) {
            $action = 'action_not_sent';
        } else {
            $action = 'action_unknown';
        }
        return $this->t($action);
    }
959831
public function retrievePageAction()
    {
        
        $configPath = 'meliscore/datas';
        $melisConfig = $this->getServiceLocator()->get('MelisCoreConfig');
        $cfg = $melisConfig->getItemPerPlatform($configPath);

        $pathAppConfigForm = '/meliscore/forms/meliscore_forgot';
        $melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $melisLostPass = $this->getServiceLocator()->get('MelisCoreLostPassword');
        $appConfigForm = $melisMelisCoreConfig->getItem($pathAppConfigForm);
        
        $factory = new \Zend\Form\Factory();
        $forgotForm = $factory->createForm($appConfigForm);
        
        $translator = $this->getServiceLocator()->get('translator');
        $this->getServiceLocator()->get('ViewHelperManager')->get('HeadTitle')->set($translator->translate('tr_meliscore_forgot_page_title'));
        
        $view = new ViewModel();
        $view->setVariable('meliscore_forgot', $forgotForm);
        $view->setVariable('formFactory', $factory);
        $view->setVariable('formConfig', $appConfigForm);
        $this->layout()->schemes = $this->getSchemes();

        return $view;
    }
12608
public function indexAction()
    {
        $query = (string) $this->params()->fromQuery('query', null);
        $query = strlen($query) > 0 ? $query : null;

        $orderBy = (string) $this->params()->fromQuery('orderBy', null);
        $orderBy = strlen($orderBy) > 0 ? $orderBy : null;

        $sort = (string) $this->params()->fromQuery('sort', null);
        $sort = strlen($sort) > 0 ? $sort : null;

        $page  = (int) $this->params()->fromRoute('page', 1);
        $limit = $this->getOptions()->getDefaultItemsPerPage();

        $entities = $this->getService()->pagination($page, $limit, $query, $orderBy, $sort);

        $view = new ViewModel(array(
            'options'  => $this->getOptions(),
            'entities' => $entities,
            'query'    => $query,
            'orderBy'  => $orderBy,
            'sort'     => $sort,
        ));

        return $view;
    }
89646
protected function getRequestData()
    {
        return [
            'request'  => $this->request->toArray(),
            'response' => [
                'content'      => null,
                'content_type' => null,
                'status_code'  => ServiceResponseInterface::HTTP_OK
            ],
            'resource' => $this->resourcePath
        ];
    }
727448
public function getValue()
    {
        $values = array();
        foreach (array_keys($this->pages) as $id) {
            $pageValues = $this->getSessionContainer()->getValues($id);
            // skip elements representing actions
            foreach ($pageValues as $key => $value) {
                if (0 !== strpos($key, '_qf')) {
                    if (isset($values[$key]) && is_array($value)) {
                        $values[$key] = self::arrayMerge($values[$key], $value);
                    } else {
                        $values[$key] = $value;
                    }
                }
            }
        }
        return $values;
    }
1025936
public function listAction()
    {
        $this->routeParam()->mapPageTo($this->queryService);
        $collection = $this->queryService->findUsedTags();

        return $this->viewModelFactory()->createFor($collection);
    }
466664
protected function getPaginationData()
	{
		// Choose page range ( window ) and set start/end page range.
		$this->setPageRange();

		// Set previous/next page number.
		$this->setPrevNumPage();
		$this->setNextNumPage();

		$pagination['template']		= $this->layout_template;
		$pagination['items_total'] 	= $this->getNumTotalResults();
		$pagination['item_start']		= ( ( $this->prev_num_page * $this->items_per_page ) + 1 );
		$pagination['item_end']		= ( $this->current_page_number * $this->items_per_page );
		$pagination['params']			= $this->params_template;
		if ( $pagination['item_end'] > $this->getNumTotalResults() )
		{
			$pagination['item_end'] = $this->getNumTotalResults();
		}
		$pagination['num_pages']		= $this->num_pages;
		$pagination['current_page']	= $this->current_page_number;

		// Links.
		for ( $i = $this->start_page_range; $i<= $this->end_page_range; $i++ )
		{
			$pagination['pages'][$i]['number']		= (int)$i;
		 	$pagination['pages'][$i]['is_current'] 	= ( $i == $this->current_page_number );

		 	$pagination['pages'][$i]['link'] 		= $this->url_base;
		 	if ( 1 != $i )
		 	{
		 		$pagination['pages'][$i]['link'] 	= $this->url_base . $this->separator_link_page . $i;
		 	}

		}

		if ( $this->prev_num_page > 0 )
		{
			$pagination['previous_page']['number'] 	= $this->prev_num_page;

			$pagination['previous_page']['link'] 		= $this->url_base;
			if ( 1 != $this->prev_num_page )
			{
				$pagination['previous_page']['link'] = $this->url_base . $this->separator_link_page . $this->prev_num_page;
			}
		}

		if ( $this->next_num_page > 0 )
		{
			$pagination['next_page']['number'] 		= $this->next_num_page;
			$pagination['next_page']['link'] 			= $this->url_base . $this->separator_link_page . $this->next_num_page;;
		}

		if ( 1 != $this->current_page_number )
		{
			$pagination['first_page']['number'] 		= 1;
			$pagination['first_page']['link'] 		= $this->url_base;
		}

		if ( $this->num_pages != $this->current_page_number )
		{
			$pagination['last_page']['number']	 	= $this->num_pages;
			$pagination['last_page']['link'] 			= $this->url_base . $this->separator_link_page . $this->num_pages;
		}

		$pagination['items_per_page'] 		= $this->items_per_page;
		$pagination['display_items_per_page'] = $this->display_items_per_page;

		return $pagination;
	}
615096
public function getCurrentPage()
    {
        $page = (int) $this->request->getParam(self::PAGE_PARM_NAME);
        return $page ? $page : 1;
    }