Returns the request map for GET requests

@return array
198528
protected function getMap(): array
    {
        $auth = $this->core->auth();
        $paths = [
            ['GET', '/sw.[i].js', function () {
                if (headers_sent() === false) {
                    header("Content-Type: application/javascript");
                }
                return file_get_contents(dirname(__DIR__) . "/files/sw.js");
            }],
            ['GET', '/offline', "Home@offline"],
        ];
        if ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/api/[**:link]?', "API"],
                ['GET', '/login', "Auth@showLogin", 'login-page'],
                ['GET', '/register', "Auth@showRegister", 'register-page'],
                ['GET', '/confirm', "Auth@confirm", 'confirm-page'],
                ['GET', '/forgot', "Auth@showForgot", 'forgot-page'],
                ['GET', '/reset/[a:reset_code]', "Auth@showReset", 'reset-page']
            ]);
        } else {
            $paths = array_merge($paths, [
                ['GET', '/api/[**:link]', "Auth@redirect"],
                ['GET', '/login', "Auth@redirect"],
                ['GET', '/register', "Auth@redirect"],
                ['GET', '/confirm', "Auth@confirm", 'confirm-page'],
                ['GET', '/forgot', "Auth@redirect"],
                ['GET', '/reset/[a:reset_code]', "Auth@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 5, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/', "User@showProfile", 'home-page'],
                ['GET', '/logout', "User@logout", 'logout-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/', "Home@redirect"],
                ['GET', '/logout', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 4, "max" => 4]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/users', "User@showList", 'users-list-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/users', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 4, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/pages/[i:page]?', "Page@showList", 'pages-list-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/pages/[i:page]?', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 3, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/pages/new', "Page@showNew", 'pages-new-page'],
                ['GET', '/pages/edit/[i:id]', "Page@showEdit", 'pages-edit-page'],
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/pages/new', "Home@redirect"],
                ['GET', '/pages/edit/[i:id]', "Home@redirect"],
            ]);
        }
        if ($auth->allow(["min" => 2, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/navigations', "Navigation@showNavigations", 'navigations-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/navigations', "Home@redirect"]
            ]);
        }
        if ($auth->allow(["min" => 1, "max" => 1]) === true) {
            $paths = array_merge($paths, [
                ['GET', '/users/[i:page]?', "User@showList", 'users-list-page'],
                ['GET', '/users/new', "User@showNew", 'users-new-page'],
                ['GET', '/users/edit/[i:id]', "User@showEdit", 'users-edit-page'],
                ['GET', '/settings', "Site@showSettings", 'settings-page']
            ]);
        } elseif ($auth->details === false) {
            $paths = array_merge($paths, [
                ['GET', '/users/[i:page]?', "Home@redirect"],
                ['GET', '/users/new', "Home@redirect"],
                ['GET', '/users/edit/[i:id]', "Home@redirect"],
                ['GET', '/settings', "Home@redirect"]
            ]);
        }
        return $paths;
    }
881321
public function getMappings()
    {
        if ($this->mappings === null) {
            $this->mappings = new Mappings($this->data['mappings'], $this);
        }
        return $this->mappings;
    }
1344151
public function getList()
	{
		$this->getResponse()
			->setStatusCode(Response::STATUS_CODE_200);
		
		// 1) getting params
		$page = (int) $this->params()->fromQuery("page", 1);
		$category = $this->params()->fromQuery("category", "usato");
		$purpose = $this->params()->fromQuery("purpose", "compravendita");
		$location = $this->params()->fromQuery("location", "italia");
		$limit = 30;
		$offset = ($page * $limit) - $limit;
		$returnSelect = true;
		
		// 2) Discard useless params and prepare them to be passed to the model
		$params = $this->requestToSearchParams($this->params()->fromQuery());
		$params = is_array($params) ? $params + compact('returnSelect', 'offset', 'limit') : array();
		
		if(empty($params)) {
            return new JsonModel(array());
		}
		
		// 3) get only for current user?
		$onlyCurrentUser = (bool) $this->params()->fromQuery("current", false);
		$k = 0;
		foreach($params['field'] as $f) {
			if('current' == $f || 'user' == $f) {
				unset($params['field'][$k]);
				unset($params['value'][$k]);
			}
			$k++;
		}
		if($onlyCurrentUser) {
			if($this->zfcUserAuthentication()->hasIdentity()) {
				$identity = $this->zfcUserAuthentication()->getIdentity();
// 				$params['field'][] = 'user';
// 				$params['value'][] = sha1('neo' . $identity->getUserId() . 'bazaar');
				$params['field'][] = 'account';
				$params['value'][] = sha1('neo' . $identity->getUserId() . 'bazaar');
			} else {
				// Questo è necessario per non far restituire la lista completa se l'utente non è connesso
				$params['field'][] = 'account';
				$params['value'][] = sha1('usernotconnected');
			}
		}
		
		// 4) all classifieds? This should be requested only by the admin, will not use sphinx
		if((bool) $this->params()->fromQuery("full", false)) {
			if($this->zfcUserAuthentication()->hasIdentity()) {
			    $params = $this->params()->fromQuery();
				$identity = $this->zfcUserAuthentication()->getIdentity();
				$userModel = $this->getServiceLocator()->get('user.model.user');
				$userModel->init($identity, $this->getServiceLocator());
				if(!$userModel->getIsAdmin()) {
				    return new JsonModel(array());
				}
				
				$paginator = $this->getServiceLocator()->get('document.paginator.classifiedFull');
				$paginator->build($params);

				$data = array();
				foreach($paginator as $post) {
            		$file = $this->getServiceLocator()->get('document.model.classifiedAdminListing');
				    $data[] = $file->init($post);
				}

				$routeName = 'DocumentAdminClassified/page';
				$routeParams = array('page' => $this->params()->fromQuery("page", 1));
				$queryParams = array('full' => 1, 'user' => $this->params()->fromQuery("user"));
				$data = $this->getModel()->getPaginationData($this->getServiceLocator(), $paginator, $data, $routeName, $routeParams, $queryParams);

				return new JsonModel($data);
			}
		}
		
		// 5) Pass param to the model and get the data
		$data = $this->getModel()->getList($params, $this->getServiceLocator());
		
		return new JsonModel($data);
	}
1132126
public function routes()
    {
        $routes = $this->app->make('routes.collection')->getAll();

        $headers = ['Condition', 'Filter', 'Action', 'Parameters', 'Pattern', 'Guid'];

        $dataset = array_map(function ($route) {
            return [
                $route->getCondition(),
                $route->getFilter(),
                $route->getAction(),
                $route->getParameters(),
                $route->getPattern(),
                $route->getGuid(),
            ];
        }, $routes);

        $this->table($headers, $dataset);
    }
87702
public static function getServicesList()
    {
        $map = [
          'GET' => 'get',
          'POST' => 'create',
          'PUT' => 'update',
          'DELETE' => 'delete',
        ];
        
        $table = new \Console_Table();
        $table->setHeaders(['Method', 'Type', 'Description', 'Parameters']);
        foreach (self::getServices() as $key => $service) {
            if ($service['type'] == 'entity') {
                foreach ($service['actions'] as $action) {
                    $table->addRow([
                        sprintf('xAC::%s()->%s()'
                            , $service['endpoint']
                            , $action['endpoint'] == 'default' ? $map[$action['method']] : $action['endpoint']
                            ), 
                        'entity/' . $action['type'], 
                        $action['description']
                    ]);
                }
            } else {
                $table->addRow(['xAC::' . $service['endpoint'] . '()->get()', $service['type'], $service['description']]);
            }
        }
        
        echo $table->getTable();
    }
562511
public static Map<String, String[]> getParameterMap()
	{
		final Request request = RequestCycle.get().getRequest();
		return getParameterMap(request);
	}
438618
public function getQueues()
    {
        $informations = json_decode($this->query('GET', '/api/queues/'.$this->credentials['vhost']), true);
        $queues = array();
        foreach ($informations as $information) {
            $queues[] = $information['name'];
        }

        return $queues;
    }
1324398
private function getHeaders()
        {
            if(function_exists('apache_request_headers')) {
                return apache_request_headers();
            }
            $headers = array();
            $keys = preg_grep('{^HTTP_}i', array_keys($_SERVER));
            foreach($keys as $val) {
                    $key = repl(' ', '-', ucwords(Inflector::lower(repl('_', ' ', substr($val, 5)))));
                    $headers[$key] = $_SERVER[$val];
                }
            return $headers;
        }
620010
private function getParameters()
    {
        $routeParameters = $this->request->attributes->get('_route_params');
        $parameters = $this->request->query->all();

        if ($routeParameters) {
            $parameters = array_merge($routeParameters, $parameters);
        }

        return $parameters;
    }
1079104
protected function getRoutes()
    {
        $c = self::ROUTE_PATTERN_CONTROLLER;
        $a = self::ROUTE_PATTERN_ACTION;
        $p = self::ROUTE_PATTERN_PARAMS;
        return array(
            "/" => self::MATCHES_NOTHING,
            "/$c" => self::MATCHES_CONTROLLER,
            "/$c/" => self::MATCHES_CONTROLLER,
            "/$c/$a" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/" => self::MATCHES_CONTROLLER_AND_ACTION,
            "/$c/$a/$p" => self::MATCHES_CONTROLLER_ACTION_AND_PARAMS
        );
    }
911823
public function getMapping(Request $request): array
    {
        return $this->cache->load($this->getCacheKey($request), function (&$dependencies) use ($request) {
            return $this->loadMapping($request->getPresenterName(), $request->getParameters(), $dependencies);
        });
    }
37970
protected function pullGet(): array {
		if (!is_array($this->getVars)) {
			$this->getVars = $this->request->getQueryParams();
		}
		
		return $this->getVars;
	}
893666
public static function GetRequestHeaders()
	{

		if (function_exists('getallheaders')) return getallheaders();

		$headers = array();
		foreach ($_SERVER as $k => $v)
		{
			if (substr($k, 0, 5) == "HTTP_")
			{
				$k = str_replace('_', ' ', substr($k, 5));
				$k = str_replace(' ', '-', ucwords(strtolower($k)));
				$headers[$k] = $v;
			}
		}
		return $headers;
	}
903620
public function getContext(): ?array
    {
        if ($this->currentRequest === null) {
            return null;
        }

        $controller = null;

        if ($route = $this->currentRequest->route()) {
            $controller = $route->controller;

            if (! $controller && ! is_string($route->action['uses'])) {
                $controller = $route->action['uses'];
            }
        }

        return [
            'uri' => $this->currentRequest->getUri(),
            'method' => $this->currentRequest->getMethod(),
            'controller' => $controller ? $this->cloner->cloneVar(class_basename($controller)) : $controller,
            'identifier' => spl_object_hash($this->currentRequest),
        ];
    }
706780
public function getLinks() : Array
    {
        if( ! $this->isJsonCheck() || $this->refresh === true )
        {
            $result = $this->getApiResult();

            if( ! is_object($result) )
            {
                throw new Exception\BadRequestURLException($this->address);
            }

            $this->putJsonContent($result);
        }

        $result = $this->decodeArrrayJsonContent();

        return $this->convertArrayByKeyValues($result);
    }
453901
public function get(): array
    {
        $dataFetcher = new DataFetcher($this->httpClient);

        $this->data = $dataFetcher->get($this->query, $this->pluck);

        return $this->data;
    }
627125
private function _request()
    {
        $res = $this->_client->request(
            $this->_method,
            $this->_endpoint . '?' . $this->_query_parameters,
            [
                'headers' => $this->_headers,
                'http_errors' => false
            ]
        );
        return array(
            'code' => $res->getStatusCode(),
            'body' => new SimpleXMLElement($res->getBody())
        );
    }