public function appendSuffixFilter($path_or_url, $suffix)
    {
        $path = $this->decomposeUrl($path_or_url);
        $path_parts = pathinfo($path['path']);
        $new_path = $path_parts['filename'] . $suffix . "." . $path_parts['extension'];
        if (!empty($path_parts['dirname']) && $path_parts['dirname'] !== ".") {
            $new_path = $path_parts['dirname'] . DIRECTORY_SEPARATOR . $new_path;
            $new_path = preg_replace('#/+#', '/', $new_path);
        }
        $output = $path['prefix'] . $new_path . $path['suffix'];
        return $output;
    }
public function appendSuffixFilter($path_or_url, $suffix)
    {
        $path = $this->decomposeUrl($path_or_url);
        $path_parts = pathinfo($path['path']);
        $new_path = $path_parts['filename'] . $suffix . "." . $path_parts['extension'];
        if (!empty($path_parts['dirname']) && $path_parts['dirname'] !== ".") {
            $new_path = $path_parts['dirname'] . DIRECTORY_SEPARATOR . $new_path;
            $new_path = preg_replace('#/+#', '/', $new_path);
        }
        $output = $path['prefix'] . $new_path . $path['suffix'];
        return $output;
    }
public function appendSuffixFilter ( $ path_or_url , $ suffix ) { $ path = $ this -> decomposeUrl ( $ path_or_url ) ; $ path_parts = pathinfo ( $ path [ 'path' ] ) ; $ new_path = $ path_parts [ 'filename' ] . $ suffix . "." . $ path_parts [ 'extension' ] ; if ( ! empty ( $ path_parts [ 'dirname' ] ) && $ path_parts [ 'dirname' ] !== "." ) { $ new_path = $ path_parts [ 'dirname' ] . DIRECTORY_SEPARATOR . $ new_path ; $ new_path = preg_replace ( '#/+#' , '/' , $ new_path ) ; } $ output = $ path [ 'prefix' ] . $ new_path . $ path [ 'suffix' ] ; return $ output ; }
Append a suffix a passed url or path

@param $path_or_url
@param $suffix
@return string
Append a suffix a passed url or path