protected function convertKeys(array $meta) {
        $return = [];
        foreach ($meta as $key => $value) {
            if (is_array($value)) {
                $value = $this->convertKeys($value);
            }
            $newKey = strtolower($key);
            $newKey = preg_replace('/[^\w+]/', '_', $newKey);
            $return[$newKey] = $value;
        }
        return $return;
    }
protected function convertKeys(array $meta) {
        $return = [];
        foreach ($meta as $key => $value) {
            if (is_array($value)) {
                $value = $this->convertKeys($value);
            }
            $newKey = strtolower($key);
            $newKey = preg_replace('/[^\w+]/', '_', $newKey);
            $return[$newKey] = $value;
        }
        return $return;
    }
protected function convertKeys ( array $ meta ) { $ return = [ ] ; foreach ( $ meta as $ key => $ value ) { if ( is_array ( $ value ) ) { $ value = $ this -> convertKeys ( $ value ) ; } $ newKey = strtolower ( $ key ) ; $ newKey = preg_replace ( '/[^\w+]/' , '_' , $ newKey ) ; $ return [ $ newKey ] = $ value ; } return $ return ; }
convert meta data keys

Creates "compatible" keys allowing easy access e.g. as template var.

Conversions applied:

- lowercase all chars
- replace special chars and whitespace with underscore

@param array $meta meta-data
@return array
convert meta data keys