Fetches the market types.

Will return all 13 pages of market types as json.

@return Array of json decoded responses
168018
public function fetchTypes() {
        $response = $this->client->request('GET', 'https://crest-tq.eveonline.com/market/types/');

        return iterator_to_array($this->getOtherPages(json_decode($response->getBody()->getContents())));
    }
514696
public function getList()
    {
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $type = $this->params()->fromRoute("type", null);
        $anneeScolaire = $this->params()->fromRoute("annee_scolaire", null);
        if (! is_null($type)) {
            $formatter = $this->getServiceLocator()->get($type . AbstractFormatterFactory::$termination);
            $columns = $this->params()->fromQuery("columns", null);
            $start = $this->params()->fromQuery("start", null);
            $length = $this->params()->fromQuery("length", null);
            $order = $this->params()->fromQuery("order", null);
            $search = $this->params()->fromQuery("search", null);
            $data = $formatter->getData($columns, $start, $length, $order, $search, $anneeScolaire);
            $response->setContent(\Zend\Json\Json::encode($data));
        }
        
        return $response;
    }
595809
public function jsonSerialize()
    {
        $response = [];
        $response['displayMenu'] = $this->collection->displayMenu();
        $response['entries'] = [];
        $response['entryGroups'] = [];
        foreach ($this->collection->getEntries() as $entry) {
            $formatter = new EntryJsonFormatter($entry);
            $response['entries'][] = $formatter->jsonSerialize();
        }
        foreach ($this->collection->getEntryGroups() as $group) {
            $formatter = new GroupJsonFormatter($group);
            $response['entryGroups'][] = $formatter->jsonSerialize();
        }

        return $response;
    }
918112
public function getClientsAndContentTypesAsChoices(): array
    {
        $clientsAndContentTypes = [];

        foreach ($this->clientsConfig as $clientName => $clientConfig) {
            /** @var \Contentful\Delivery\Client $client */
            $client = $clientConfig['service'];

            $clientsAndContentTypes[$client->getSpace()->getName()] = $clientName;
            foreach ($client->getContentTypes()->getItems() as $contentType) {
                /* @var \Contentful\Delivery\Resource\ContentType $contentType */
                $clientsAndContentTypes['>  ' . $contentType->getName()] = $clientName . '|' . $contentType->getId();
            }
        }

        return $clientsAndContentTypes;
    }
371503
public function getAllItems() {
    if (version_compare(phpversion(), '5.3.0', '<')) {
      return json_encode($this->m_aItems);
    }
    else {
      return json_encode($this->m_aItems, JSON_UNESCAPED_UNICODE);
    }
  }
152063
public function getAll()
    {
        $all   = [];
        $pages = $this->getPages();

        if ($this->getFirst() !== null) {
            $all[$this->getFirst()] = Pagination::FIRST;
        }

        if ($this->getLess() !== null) {
            $all[$this->getLess()] = Pagination::LESS;
        }

        foreach ($pages as $k => $page) {
            $all[$k] = $page;
        }

        if ($this->getMore() !== null) {
            $all[$this->getMore()] = Pagination::MORE;
        }

        if ($this->getLast() !== null) {
            $all[$this->getLast()] = Pagination::LAST;
        }

        ksort($all);

        return $all;
    }
389779
public function toArray() {
        $data = array_map(function ($value) {
            if ($value instanceof ArrayAble) {
                return $value->toArray();
            }
            return $value;
        }, $this->getPage());
        return [
            'paging' => [
                'limit' => $this->getPageSize(),
                'offset' => $this->getIndex(),
                'total' => $this->getTotal(),
                'more' => $this->hasMore()
            ],
            'data' => $data
        ];
    }
1033415
public function getAll()
    {
        $result = $this->wsClient->invokeOperation('listtypes', [ ], 'GET');
        $modules = $result[ 'types' ];

        $result = array();
        foreach ($modules as $moduleName) {
            $result[ $moduleName ] = [ 'name' => $moduleName ];
        }
        return $result;
    }
1262194
public function aujaSerialize() {
        $result = array();

        $result['type'] = $this->getType();
        $result[$this->getType()] = $this->basicSerialize();

        if ($this->nextPageUrl != null || $this->totalPageUrl != null) {
            $result['paging'] = array();
            if ($this->nextPageUrl != null) {
                $result['paging']['next'] = $this->nextPageUrl;
            }
            if ($this->totalPageUrl != null) {
                $result['paging']['total'] = $this->totalPageUrl;
            }
        }

        return $result;
    }
687315
public function jsonSerialize(): array
	{
		if($this->pagination === null)
		{
			return $this->toArray();
		}

		return ['data' => $this->toArray(), 'pagination' => $this->pagination->toArray()];
	}
1311731
public function jsonSerialize(): array
    {
        $instruction = ['type' => $this->type];

        if ($this->type !== self::TYPE_NOOP) {
            $instruction = array_merge($instruction, [
                'name' => $this->name,
                'catched' => $this->shouldCatchErrors,
            ]);

            if ($this->type !== self::TYPE_GET) {
                $instruction['value'] = $this->value;
            }

            if ($this->resource !== null) {
                $instruction['resource'] = $this->resource;
            }
        }

        return $instruction;
    }
956072
public function getTextItems()
    {
        $parameters = func_get_args();

        //set parameter values
        if (count($parameters) == 1) {
            $pageNumber = $parameters[0];
        } else if (count($parameters) == 2) {
            $pageNumber = $parameters[0];
            $fragmentNumber = $parameters[1];
        }


        $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName();
        if (isset($parameters[0])) {
            $strURI .= '/pages/' . $pageNumber;
            if (isset($parameters[1])) {
                $strURI .= '/fragments/' . $fragmentNumber;
            }
        }
        $strURI .= '/TextItems';
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $json = json_decode($responseStream);

        return $json->TextItems->List;
    }
1269889
public function getJsonItemSchemas()
	{
		$list = array();

		foreach( $this->_getControllers() as $name => $controller ) {
			$list[$name] = $controller->getItemSchema();
		}

		if( ( $json = json_encode( $list ) ) === null ) {
			throw new Exception( 'Unable to encode schemas to JSON' );
		}

		return $json;
	}
480814
protected function toJson()
    {
        $serializedActionResults = [];

        foreach ($this->results as $action => $result) {
            $serializedActionResults[$action] = serialize($result);
        }

        $responseData = [
            'requestId' => $this->requestId,
            'actionResults' => $serializedActionResults
        ];

        return json_encode($responseData);
    }
739145
protected List jsonList() {
        checkJsonContentType();
        try {
            return JsonHelper.toList(getRequestString());
        } catch (IOException e) {
            throw new WebException(e);
        }
    }
317652
public function toQueryParts(): array
    {
        if (empty($this->startIndex) && empty($this->endIndex)) {
            return [];
        }

        // @todo PHP appears to leak memory in both json_decode() and unserialize() with large result sets. Our best
        // guess is that some amount of data causes PHP to allocate larger chunks, and perhaps that class of memory
        // isn't ever a candidate for garbage collection. In general, paging over result sets (like in
        // \Lullabot\Mpx\Tests\Functional\DataService\Media\MediaQueryTest) should use a constant amount of memory per
        // page. 250 comes from tests on macOS with PHP 7.2 - going to 300 results causes an obvious memory leak.
        if ($this->endIndex - $this->startIndex > 250) {
            @trigger_error('PHP may leak memory with large result pages. Consider reducing the number of results per page.', E_USER_DEPRECATED);
        }

        return ['range' => $this->startIndex.'-'.$this->endIndex];
    }
1283361
public static function getTypeList() : array
    {
        $arResult = [
            self::PROMO_BLOCK_TYPE => Lang::get('lovata.shopaholic::lang.field.promo_block_type'),
        ];

        $arEventDataList = Event::fire(self::EVENT_GET_TYPE_LIST);
        if (empty($arEventDataList)) {
            return $arResult;
        }

        foreach ($arEventDataList as $arEventData) {
            if (empty($arEventData) || !is_array($arEventData)) {
                continue;
            }

            $arResult = array_merge($arResult, $arEventData);
        }

        return $arResult;
    }