public function getKey($val = null, $var = null, $section = false)
    {
        if (!empty($val)) {
            if (!empty($var)) {
                foreach ($this->registry as $_sct=>$_data) {
                    if ($ok=array_search($val, $_data) && $ok==$var) {
                        return $_sct;
                    }
                }
            } elseif (!empty($section) && isset($this->registry[$section])) {
                return array_search($val, $this->registry[$section]);
            } else {
                return array_search($val, $this->registry);
            }
        }
    }
public function getKey($val = null, $var = null, $section = false)
    {
        if (!empty($val)) {
            if (!empty($var)) {
                foreach ($this->registry as $_sct=>$_data) {
                    if ($ok=array_search($val, $_data) && $ok==$var) {
                        return $_sct;
                    }
                }
            } elseif (!empty($section) && isset($this->registry[$section])) {
                return array_search($val, $this->registry[$section]);
            } else {
                return array_search($val, $this->registry);
            }
        }
    }
public function getKey ( $ val = null , $ var = null , $ section = false ) { if ( ! empty ( $ val ) ) { if ( ! empty ( $ var ) ) { foreach ( $ this -> registry as $ _sct => $ _data ) { if ( $ ok = array_search ( $ val , $ _data ) && $ ok == $ var ) { return $ _sct ; } } } elseif ( ! empty ( $ section ) && isset ( $ this -> registry [ $ section ] ) ) { return array_search ( $ val , $ this -> registry [ $ section ] ) ; } else { return array_search ( $ val , $ this -> registry ) ; } } }
Search a key in registry

@param   mixed   $val        The variable value to find
@param   string  $var        The variable name to search in (in case of array)
@param   string  $section    A section name in the registry (default is FALSE)
@return  string|null         The key found in the registry
Search a key in registry