$mustache should be public

be cause of this code works : 
(for zf2 view helper usage)
public function addBasePath(MvcEvent $e) {
        $viewModel = $e->getViewModel();
        $variables = $viewModel->getVariables();
        $mustacheEngine = $e->getApplication()->getServiceManager()->get('mustacheviewrenderer')->getEngine();
        $basePathHelper =  $e->getApplication()->getServiceManager()->get('viewhelpermanager')->get('basepath');
        $mustacheEngine->zendHelpers['basepath'] = $basePathHelper;
        $mustacheEngine->addHelper('basePath', function($text,$mustache) {
            // global $basePathHelper;
            $basepathhelper = $mustache->mustache->zendHelpers['basepath'];
            return $basepathhelper->__invoke($text);
        });
        
    }