Returns list of segment values callbacks

If array key is a string, than value added directly

@return array
167481
protected function _getSegmentValues()
    {
        return array(
            'customer_group_id' => array(self::XML_PATH_SEGMENT_CUSTOMER_GROUP, function () {
                return $this->_noSessionCall ? 0 : Mage::getSingleton('customer/session')->getCustomerGroupId();
            }),
            'store_id' => array(self::XML_PATH_SEGMENT_STORE, function () {
                return Mage::app()->getStore()->getId();
            }),
            'currency' => array(self::XML_PATH_SEGMENT_CURRENCY, function () {
                return Mage::app()->getStore()->getCurrentCurrencyCode();
            })
        );
    }
153491
public function getSuggestedValuesForSegment($segmentName, $idSite)
    {
        if (empty(Config::getInstance()->General['enable_segment_suggested_values'])) {
            return array();
        }

        Piwik::checkUserHasViewAccess($idSite);

        $maxSuggestionsToReturn = 30;
        $segment = $this->findSegment($segmentName, $idSite);

        // if segment has suggested values callback then return result from it instead
        $suggestedValuesCallbackRequiresTable = false;
        if (isset($segment['suggestedValuesCallback'])) {
            $suggestedValuesCallbackRequiresTable = $this->doesSuggestedValuesCallbackNeedData(
                $segment['suggestedValuesCallback']);

            if (!$suggestedValuesCallbackRequiresTable) {
                return call_user_func($segment['suggestedValuesCallback'], $idSite, $maxSuggestionsToReturn);
            }
        }

        // if period=range is disabled, do not proceed
        if (!Period\Factory::isPeriodEnabledForAPI('range')) {
            return array();
        }

        if (!empty($segment['unionOfSegments'])) {
            $values = array();
            foreach ($segment['unionOfSegments'] as $unionSegmentName) {
                $unionSegment = $this->findSegment($unionSegmentName, $idSite);

                try {
                    $result = $this->getSuggestedValuesForSegmentName($idSite, $unionSegment, $maxSuggestionsToReturn);
                    if (!empty($result)) {
                        $values = array_merge($result, $values);
                    }
                } catch (\Exception $e) {
                    // we ignore if there was no data found for $unionSegmentName
                }
            }

            if (empty($values)) {
                throw new \Exception("There was no data to suggest for $segmentName");
            }

        } else {
            $values = $this->getSuggestedValuesForSegmentName($idSite, $segment, $maxSuggestionsToReturn);
        }

        $values = $this->getMostFrequentValues($values);
        $values = array_slice($values, 0, $maxSuggestionsToReturn);
        $values = array_map(array('Piwik\Common', 'unsanitizeInputValue'), $values);

        return $values;
    }
916098
final private function getSqlKeyValues() {
		
		// force to array
		$propertyNames = (array)$this->keyProperties;

		// list to return
		$values = array();

		foreach ($propertyNames as $name) {
			$values[] = $this->{$name};
		}

		return $values;

	}
1030818
public function getValues()
    {
        $values = array();

        foreach ($this->getFields() as $field) {
            $name = $field->getBaseName();
            $index = $field->getIndex();

            if ($index === null) {
                $values[$name] = $field->getValue();
            } else {
                if (!isset($values[$name])) {
                    $values[$name] = array();
                }

                if ($index) {
                    $value = &$values[$name];
                    foreach ($index as $part) {
                        if (!isset($value[$part])) {
                            $value[$part] = array();
                        }
                        $value = &$value[$part];
                    }
                    $value = $field->getValue();
                } else {
                    $values[$name][] = $field->getValue();
                }
            }
        }

        return $values;
    }
580316
public function getValue()
    {
        $parts = $this->literalParts;
        
        reset($this->encodedParts);
        ksort($this->encodedParts);
        while (current($this->encodedParts) !== false) {
            $parts[key($this->encodedParts)] = $this->getNextEncodedValue();
        }
        
        ksort($parts);
        return array_reduce(
            $parts,
            function ($carry, $item) {
                return $carry . $item;
            },
            ''
        );
    }
925653
public function arrayStringKeys(Array_ $array)
    {
        $keys = [];
        foreach ($array->items as $item) {
            if ($item->key instanceof String_) {
                $keys[] = $item->key->value;
            }
        }

        return $keys;
    }
1309282
public function getEventAllowableValues()
    {
        return [
            self::EVENT_BOUNCES,
            self::EVENT_HARD_BOUNCES,
            self::EVENT_SOFT_BOUNCES,
            self::EVENT_DELIVERED,
            self::EVENT_SPAM,
            self::EVENT_REQUESTS,
            self::EVENT_OPENED,
            self::EVENT_CLICKS,
            self::EVENT_INVALID,
            self::EVENT_DEFERRED,
            self::EVENT_BLOCKED,
            self::EVENT_UNSUBSCRIBED,
        ];
    }
453759
public function getDynValues()
    {
        if (!$this->_aDynValues) {
            $sRawDynValue = null;
            if (is_object($this->oxpayments__oxvaldesc)) {
                $sRawDynValue = $this->oxpayments__oxvaldesc->getRawValue();
            }

            $this->_aDynValues = \OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($sRawDynValue);
        }

        return $this->_aDynValues;
    }
1224367
public static final function values() {
			$key = get_called_class();

			if (array_key_exists($key, self::$types))
				return self::$types[$key];

			return array();
		}
848464
private function _values($exclude_primary_key = true)
	{
		$values = [];

		foreach($this->storage as $key => $value) {
			if ($key == static::$primary_key && $exclude_primary_key) {
				continue;
			}
			$values[] = $value;
		}

		return $values;
	}
73263
private static function parseQuery() : array
    {
        /*
         * Parse the query string. We need to do this ourself, so that we get access
         * to the raw (urlencoded) values. This is required because different software
         * can urlencode to different values.
         */
        $data = [];
        $relayState = '';
        $sigAlg = '';
        $sigQuery = '';
        foreach (explode('&', $_SERVER['QUERY_STRING']) as $e) {
            $tmp = explode('=', $e, 2);
            $name = $tmp[0];
            if (count($tmp) === 2) {
                $value = $tmp[1];
            } else {
                /* No value for this parameter. */
                $value = '';
            }
            $name = urldecode($name);
            $data[$name] = urldecode($value);

            switch ($name) {
                case 'SAMLRequest':
                case 'SAMLResponse':
                    $sigQuery = $name.'='.$value;
                    break;
                case 'RelayState':
                    $relayState = '&RelayState='.$value;
                    break;
                case 'SigAlg':
                    $sigAlg = '&SigAlg='.$value;
                    break;
            }
        }

        $data['SignedQuery'] = $sigQuery.$relayState.$sigAlg;

        return $data;
    }
508682
public static function getEnabledValues()
    {
        $result = array();
        foreach (static::$validValues as $key => $enabled) {
            if ($enabled) {
                $result[] = $key;
            }
        }
        return $result;
    }
228937
public function getSupportedTanMechanisms()
    {
        $segments = $this->findSegments('HIRMS');
        // @todo create method to get reference element from request
        foreach ($segments as $segment) {
            $segment = $this->splitSegment($segment);
            array_shift($segment);
            foreach ($segment as $seg) {
                list($id, $msg) = explode('::', $seg, 2);
                if ("3920" == $id) {
                    if (preg_match_all('/\d{3}/', $msg, $matches)) {
                        return $matches[0];
                    }
                }
            }
        }

        return array();
    }
659325
public function values()
    {
        if ($this->values) {
            return $this->values;
        }
        $cast_method = 'castTo' . ucwords($this->castTo);
        return array_map([$this, $cast_method], $this->defaultValue());
    }
177563
public static function toString()
    {
        $return = [];

        foreach (static::$globals as $key => $value) {
            $type = gettype($value);

            if (is_callable($value)) {
                $valueString = 'callable';
                $type = 'callable';
            } elseif (is_array($value)) {
                $valueString = implode(', ', $value);
            } else {
                $valueString = (string)$value;
            }

            $return[] = sprintf(
                '"%s": (%s) %s',
                $key,
                $type,
                $valueString
            );
        }

        return implode(PHP_EOL, $return);
    }
87339
public function getValueSegmented($object, $key, $default)
    {
        if (is_null($key) || trim($key) == '') {
            return $default;
        }

        foreach (explode('.', $key) as $segment) {
            $object = is_array($object) ? (object) $object : $object;
            if (!isset($object->{$segment})) {
                return $default;
            }

            $object = $object->{$segment};
        }

        return $object;
    }
647124
public function getStatusAllowableValues()
    {
        return [
            self::STATUS_WAITING,
            self::STATUS_IN_PROGRESS,
            self::STATUS_DONE,
            self::STATUS_FAILED,
            self::STATUS_CANCELED,
        ];
    }