public function resolveProfilePath($path, $profile)
    {
        $path = $this->resolvePath($path);
        return preg_replace_callback('|\[\[([\w\_/]+)\]\]|', function ($matches) use ($profile) {
            $name = $matches[1];
            switch ($name) {
                case 'profile':
                    return $profile;
            }
            return '[[' . $name . ']]';
        }, $path);
    }
public function resolveProfilePath($path, $profile)
    {
        $path = $this->resolvePath($path);
        return preg_replace_callback('|\[\[([\w\_/]+)\]\]|', function ($matches) use ($profile) {
            $name = $matches[1];
            switch ($name) {
                case 'profile':
                    return $profile;
            }
            return '[[' . $name . ']]';
        }, $path);
    }
public function resolveProfilePath ( $ path , $ profile ) { $ path = $ this -> resolvePath ( $ path ) ; return preg_replace_callback ( '|\[\[([\w\_/]+)\]\]|' , function ( $ matches ) use ( $ profile ) { $ name = $ matches [ 1 ] ; switch ( $ name ) { case 'profile' : return $ profile ; } return '[[' . $ name . ']]' ; } , $ path ) ; }
Resolves profile path for thumbnail profile.

@param string $path
@param string $profile
@return string
Resolves profile path for thumbnail profile .