protected function _getFileName($file)
    {
        $rename = array();
        foreach ($this->_files as $value) {
            if ($value['source'] == '*') {
                if (!isset($rename['source'])) {
                    $rename           = $value;
                    $rename['source'] = $file;
                }
            }

            if ($value['source'] == $file) {
                $rename = $value;
            }
        }

        if (!isset($rename['source'])) {
            return $file;
        }

        if (!isset($rename['target']) or ($rename['target'] == '*')) {
            $rename['target'] = $rename['source'];
        }

        if (is_dir($rename['target'])) {
            $name = basename($rename['source']);
            $last = $rename['target'][strlen($rename['target']) - 1];
            if (($last != '/') and ($last != '\\')) {
                $rename['target'] .= DIRECTORY_SEPARATOR;
            }

            $rename['target'] .= $name;
        }

        return $rename;
    }
protected function _getFileName($file)
    {
        $rename = array();
        foreach ($this->_files as $value) {
            if ($value['source'] == '*') {
                if (!isset($rename['source'])) {
                    $rename           = $value;
                    $rename['source'] = $file;
                }
            }

            if ($value['source'] == $file) {
                $rename = $value;
            }
        }

        if (!isset($rename['source'])) {
            return $file;
        }

        if (!isset($rename['target']) or ($rename['target'] == '*')) {
            $rename['target'] = $rename['source'];
        }

        if (is_dir($rename['target'])) {
            $name = basename($rename['source']);
            $last = $rename['target'][strlen($rename['target']) - 1];
            if (($last != '/') and ($last != '\\')) {
                $rename['target'] .= DIRECTORY_SEPARATOR;
            }

            $rename['target'] .= $name;
        }

        return $rename;
    }
protected function _getFileName ( $ file ) { $ rename = array ( ) ; foreach ( $ this -> _files as $ value ) { if ( $ value [ 'source' ] == '*' ) { if ( ! isset ( $ rename [ 'source' ] ) ) { $ rename = $ value ; $ rename [ 'source' ] = $ file ; } } if ( $ value [ 'source' ] == $ file ) { $ rename = $ value ; } } if ( ! isset ( $ rename [ 'source' ] ) ) { return $ file ; } if ( ! isset ( $ rename [ 'target' ] ) or ( $ rename [ 'target' ] == '*' ) ) { $ rename [ 'target' ] = $ rename [ 'source' ] ; } if ( is_dir ( $ rename [ 'target' ] ) ) { $ name = basename ( $ rename [ 'source' ] ) ; $ last = $ rename [ 'target' ] [ strlen ( $ rename [ 'target' ] ) - 1 ] ; if ( ( $ last != '/' ) and ( $ last != '\\' ) ) { $ rename [ 'target' ] .= DIRECTORY_SEPARATOR ; } $ rename [ 'target' ] .= $ name ; } return $ rename ; }
Internal method to resolve the requested source
and return all other related parameters

@param  string $file Filename to get the informations for
@return array
Internal method to resolve the requested source and return all other related parameters