Get items hash for caching

@param $params
@return string
330634
public function itemsFilterHash($params) {
		$itemshash = parent::itemsFilterHash($params);

		//Select items only with some group
		if (isset($params['group'])) {
			$itemshash .= ':group=' . $params['group'];
		}
		//Select categories only with some level
		if (isset($params['level'])) {
			$itemshash .= ':level=' . $params['level'];
		}
		//Select categories only with parentid=$params['parent'].
		if (isset($params['parent'])) {
			$itemshash .= ':parent=' . $params['parent'];
		}
		//Select categories only with parentid=$params['parent'].
		if (isset($params['parentisnull'])) {
			$itemshash .= ':parentisnull=' . empty($params['parentisnull'])?'N':'Y';
		}
		//Entire parents tree. 
		if (isset($params['parenttree'])) {
			$itemid = (int)$params['parenttree'];
			$item = $this->itemGet($itemid);
			if (empty($item)) {
				return false;
			}
			$itemshash .= ':parenttree-' . $item->lft . '-' . $item->rgt;
		}
		//Entire parents tree, second version. 
		if ((isset($params['parenttree_lft'])) && (isset($params['parenttree_rgt']))) {
			$lft = $params['parenttree_lft'];
			$rgt = $params['parenttree_rgt'];
			if (($lft < 1) || ($rgt < 1) || ($lft >= $rgt)) {
				return false;
			}
			$itemshash .= ':parenttree-' . $lft . '-' . $rgt;
		}
		//Entire parents chain. 
		if (isset($params['parentchain'])) {
			$itemid = (int)$params['parentchain'];
			$item = $this->itemGet($itemid);
			if (empty($item)) {
				return false;
			}
			$itemshash .= ':parentchain-' . $item->lft . '-' . $item->rgt;
		}
		//Entire parents chain, second version. 
		if ((isset($params['parentchain_lft'])) && (isset($params['parentchain_rgt']))) {
			$lft = $params['parentchain_lft'];
			$rgt = $params['parentchain_rgt'];
			if (($lft < 1) || ($rgt < 1) || ($lft >= $rgt)) {
				return false;
			}
			$itemshash .= ':parentchain-' . $lft . '-' . $rgt;
		}
		return $itemshash;
	}
440650
private function getParams(array $params)
    {
        $result = [];
        foreach ($params as $name => $item) {
            $value = $item['value'];
            if ('collection' === $item['type']) {
                $value = $this->getParams($value);
            }

            $result[$name] = new PropertyParameter($name, $value, $item['type']);
        }

        return $result;
    }
89122
public function serializeParams($params) {
		$serialized = '';
		foreach ($params as $key => $val) {
			$serialized .= $key;
			if (is_bool($val) === true) {
				$serialized .= '=' . $val ? $this->options['param-true'] : $this->options['param-false'];
			} else if ($val != '') {
				$serialized .= '=' . $val;
			}
			$serialized .= $this->options['param-delimiter'];
		}
		return $serialized;
	}
642680
private function httpBuildQuery($params)
    {
        $query = [];
        foreach ($params as $key => $param) {
            if (!is_array($param)) {
                continue;
            }
            // when a param has many values, it generate the query string separated to join late
            foreach ($param as $subParam) {
                $query[] = http_build_query([$key => $subParam]);
            }
            unset($params[$key]);
        }

        // join queries strings
        $query[] = http_build_query($params);
        $query = implode('&', $query);

        return $query;
    }
1130932
public function getReqSign(&$params)
    {
        $params['app_id'] = $this->appId;
        if (empty($params['nonce_str'])) {
            $params['nonce_str'] = md5(uniqid("{$params['app_id']}_"));
        }
        if (empty($params['time_stamp'])) {
            $params['time_stamp'] = strval(time());
        }
        ksort($params);
        $str = '';
        array_walk($params, function ($item, $key) use (&$str) {
            if ($item !== '') {
                $str .= sprintf('%s=%s&', $key, urlencode($item));
            }
        });

        return strtoupper(md5(sprintf('%s%s=%s', $str, 'app_key', $this->secret)));
    }
782128
public function getAll($params = [])
    {
        $result = $this->connection()->get($this->getEndpoint(), $params, true);

        return $this->collectionFromResult($result);
    }
419831
public function get(array $params = [])
    {
        $entries = [];
        $this->getLogger()->info('Getting list of dataSets ');
        $response = $this->doGet($this->url, $params);

        foreach ($response as $item) {
            $entries[] = clone $this->hydrate($item);
        }

        return $entries;
    }
1217471
public function searchItems( \stdClass $params )
	{
		$this->checkParams( $params, array( 'site' ) );
		$this->setLocale( $params->site );

		$totalList = 0;
		$search = $this->initCriteria( $this->getManager()->createSearch(), $params );
		$result = $this->getManager()->searchItems( $search, [], $totalList );

		$idLists = [];
		$listItems = [];

		foreach( $result as $item )
		{
			if( ( $domain = $item->getDomain() ) != '' ) {
				$idLists[$domain][] = $item->getRefId();
			}
			$listItems[] = (object) $item->toArray( true );
		}

		return array(
			'items' => $listItems,
			'total' => $totalList,
			'graph' => $this->getDomainItems( $idLists ),
			'success' => true,
		);
	}
895515
public function download(array $params = [])
    {
        $path = $this->buildDiffPath();

        return $this->pureGet($path, $params, ['Accept' => 'text/plain'])->getBody();
    }
741338
public function download(array $params = [])
    {
        $path = $this->buildPatchPath();

        return $this->pureGet($path, $params, ['Accept' => 'text/plain'])->getBody();
    }
145242
protected function getItemByHash($hash)
    {
        foreach ($this->items as $item) {
            if ($item->getHash() === $hash) {
                return $item;
            }
        }
        
        return false;
    }
638689
public function get(array $params = [])
    {
        $this->getLogger()->info('Getting list of Playlists');
        if (isset($params['embed']))
            $embed = ($params['embed'] != null) ? explode(',', $params['embed']) : [];

        $hydratedWidgets = [];
        $entries = [];

        $response = $this->doGet('/playlist', $params);
        foreach ($response as $item) {
            /** @var XiboPlaylist $playlist */
            $playlist = new XiboPlaylist($this->getEntityProvider());
            $playlist->hydrate($item);
            if (in_array('widgets', $embed) === true) {
                foreach ($playlist->widgets as $widget) {
                    /** @var XiboWidget $widgetObject */
                    $widgetObject = new XiboWidget($this->getEntityProvider());
                    $widgetObject->hydrate($widget);
                    $hydratedWidgets[] = $widgetObject;
                }
                $playlist->widgets = $hydratedWidgets;
            }
            $entries[] = clone $playlist;
        }

        return $entries;
    }
1085257
public function searchItems( stdClass $params )
	{
		$this->_checkParams( $params, array( 'site' ) );
		$this->_setLocale( $params->site );

		$total = 0;
		$search = $this->_initCriteria( $this->_getManager()->createSearch(), $params );
		$items = $this->_getManager()->searchItems( $search, array(), $total );

		return array(
			'items' => $this->_toArray( $items ),
			'total' => $total,
			'success' => true,
		);
	}
140896
public function search($params)
    {
        $dataProvider = parent::search($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $dataProvider->query->andWhere(['IS NOT', Seo::tableName() . '.item_id', null])
            ->andFilterWhere([
                Seo::tableName() . '.modelName' => $this->modelName,
                Seo::tableName() . '.item_id' => $this->item_id,
            ]);
        return $dataProvider;
    }
980993
public function load_pod_item( $params ) {

		$params = (object) pods_sanitize( $params );

		if ( ! isset( $params->pod ) || empty( $params->pod ) ) {
			return pods_error( __( 'Pod name required', 'pods' ), $this );
		}
		if ( ! isset( $params->id ) || empty( $params->id ) ) {
			return pods_error( __( 'Item ID required', 'pods' ), $this );
		}

		$pod = false;

		if ( pods_api_cache() ) {
			$pod = pods_cache_get( $params->id, 'pods_item_object_' . $params->pod );
		}

		if ( false !== $pod ) {
			return $pod;
		}

		$pod = pods( $params->pod, $params->id );

		if ( pods_api_cache() ) {
			pods_cache_set( $params->id, $pod, 'pods_item_object_' . $params->pod );
		}

		return $pod;
	}
36544
public function getResult(...$params): string
    {
        $response = $this->getResponse(...$params);
        return $response->getBody()->getContents();
    }
341591
public function getAliases($params = [])
    {
        return $this->getClient()->indices()->getAliases(array_merge(['index' => $this->getIndexName()], $params));
    }