protected function decode($string)
    {
        // decode if specified
        if (($pos = strpos($string, ':')) !== false) {
            if (!strncmp($string, 'base64', 6)) {
                return base64_decode(substr($string, 7));
            } elseif (!strncmp($string, 'urlencode', 9)) {
                return urldecode(substr($string, 10));
            }
        }

        return $string;
    }
protected function decode($string)
    {
        // decode if specified
        if (($pos = strpos($string, ':')) !== false) {
            if (!strncmp($string, 'base64', 6)) {
                return base64_decode(substr($string, 7));
            } elseif (!strncmp($string, 'urlencode', 9)) {
                return urldecode(substr($string, 10));
            }
        }

        return $string;
    }
protected function decode ( $ string ) { // decode if specified if ( ( $ pos = strpos ( $ string , ':' ) ) !== false ) { if ( ! strncmp ( $ string , 'base64' , 6 ) ) { return base64_decode ( substr ( $ string , 7 ) ) ; } elseif ( ! strncmp ( $ string , 'urlencode' , 9 ) ) { return urldecode ( substr ( $ string , 10 ) ) ; } } return $ string ; }
decode base64 and urlencode

@param  string $string template_resource to decode
@return string decoded template_resource
decode base64 and urlencode