@param array $key

@return string
338685
public static function generateIndexName(array $key)
    {
        $nameParts = [];
        foreach ($key as $fieldName => $direction) {
            $nameParts[] = $fieldName;
            $nameParts[] = (string) $direction;
        }

        return implode('_', $nameParts);
    }
209070
public static function get($key)
    {
        if ( self::exists($key) ) {
            $key = explode('.', $key);
            $array = self::$arr[$key[0]];
            unset($key[0]);

            foreach ( $key as $k ) {
                $array = $array[$k];
            }

            return $array;
        } else {
            echo '<b>N&atilde;o existe o &iacute;ndice informado no array.</b>';
            return false;
        }
    }
871246
public static function getPrevKey($key, array $array) {
		$keys = array_keys($array);
		$found_index = array_search($key, $keys);
		if($found_index === false || $found_index === 0)
			return false;
		return $keys[$found_index - 1];
	}
169285
public function getFieldFromArrayKey($array_key)
    {
        // get table column from array key
        $key_array = explode(' ', $array_key);
        // check no of chunk
        return (count($key_array) == '2') ? $key_array[0] : ((count($key_array) > 2) ? $key_array[1] : $key_array[0]);
    }
558643
public function get(string $key)
    {
        if (array_key_exists($key, $this->get)) {
            return $this->get[$key];
        }

        return '';
    }
346257
public function render(array $array, string $key) {
    $result = null;

    if (is_array($array) && $key) {
      if (array_key_exists($key, $array)) {
        $result = $array[$key];
      }
    }

    return $result;
  }
55753
protected function get($key)
    {
        $this->loadConfigurationLazily();

        if ($this->hasConfigurationValue($key)) {
            $result = $this->configuration[$key];
        } else {
            $result = '';
        }

        return $result;
    }
380584
protected function removeTableFromKey(string $key): string
    {
        if (strpos($key, '.') === false) {
            return $key;
        }
        $keyParts = explode('.', $key);
        return array_pop($keyParts);
    }
121497
protected function getNested(string $key)
    {
        $parts = explode('.', $key);
        $result = $this->settings[$parts[0]];

        for ($i = 1; $i < count($parts); ++$i) {
            $value = $parts[$i];

            if (is_array($result) && array_key_exists($value, $result)) {
                $result = $result[$value];
                continue;
            }

            $result = null;
            break;
        }

        return $result;
    }
203325
public function header(string $key): string
    {
        if (array_key_exists($key, $this->headers)) {
            return $this->headers[$key];
        }

        return '';
    }
780257
public function first($key)
    {
        if ($this->has($key)) {
            $err = $this->_errors[$key];
            if (is_array($err)) {
                for ($i = 0; $i < count($err); $i++) {
                    if (!empty($err[$i])) {
                        return $err[$i];
                    }
                }
            } else {
                return $err;
            }
        }

        return ''; // return empty string since no key found to prevent errors
    }
11225
public function arrayKey(array $array, $key = 'key'): array
    {
        $out = [];

        foreach ($array as $id => $item) {
            if (isset($item[$key])) {
                $out[$item[$key]] =  $item;
            } else {
                $out[$id] =  $item;
            }
        }

        return $out;
    }
155828
public function isArray($key)
    {
        $fieldMeta = $this->getMeta();
        return isset($fieldMeta[$key]) && substr($fieldMeta[$key]->name, -strlen('[]')) === '[]';
    }
475657
private static function stringifyKey($key): string
    {
        if ($key === null || is_scalar($key)) {
            return (string) $key;
        }

        if (is_object($key)) {
            return spl_object_hash($key);
        }

        return static::stringifyArrayKey($key);
    }
259394
private function getURL($array, $key)
    {
        $countArray = $this->array_depth($array) - 1;
        switch ($countArray) {
            case 1:
                $url = $array['geen']['url'];
                $id = $array['geen']['id'];
                $class = $array['geen']['class'];
                $attrib = $array['geen']['attrib'];
                return [$url, $id, $class, $attrib];
            case 2:
                $url = $array['geen']['geen']['url'];
                $id = $array['geen']['geen']['id'];
                $class = $array['geen']['geen']['class'];
                $attrib = $array['geen']['geen']['attrib'];
                return [$url, $id, $class, $attrib];
            case 3:
                $url = $array['geen']['geen']['geen']['url'];
                $id = $array['geen']['geen']['geen']['id'];
                $class = $array['geen']['geen']['geen']['class'];
                $attrib = $array['geen']['geen']['geen']['attrib'];
                return [$url, $id, $class, $attrib];
            case 4:
                $url = $array['geen']['geen']['geen']['geen']['url'];
                $id = $array['geen']['geen']['geen']['geen']['id'];
                $class = $array['geen']['geen']['geen']['geen']['class'];
                $attrib = $array['geen']['geen']['geen']['geen']['attrib'];
                return [$url, $id, $class, $attrib];
            default:
                $url = $array['geen']['geen']['geen']['geen']['geen']['url'];
                $id = $array['geen']['geen']['geen']['geen']['geen']['id'];
                $class = $array['geen']['geen']['geen']['geen']['geen']['class'];
                $attrib = $array['geen']['geen']['geen']['geen']['geen']['attrib'];
                return [$url, $id, $class, $attrib];
        }
    }
1113416
public static function arrayToKey(array $array): string {
        $result = "";
        \array_walk_recursive($array, function ($key, $value) use (&$result) {
            $result .= $key . $value;
        });
        return $result;
    }
1260097
public function parseKey($key)
	{
		$segments = parent::parseKey($key);

		if (is_null($segments[0])) $segments[0] = '*';

		return $segments;
	}