public function formatPresenterClass(string $presenter): string
    {
        if (isset($this->presenterMapping[$presenter])) {
            return $this->presenterMapping[$presenter];
        }

        $parts = explode(':', $presenter);
        $presenterName = (string) array_pop($parts);
        $modules = [];
        while (!isset($this->moduleMapping[implode(':', $parts)])) {
            array_unshift($modules, (string) array_pop($parts));
        }
        $mapping = $this->moduleMapping[implode(':', $parts)];

        $class = $mapping[0];
        foreach ($modules as $module) {
            $class .= str_replace('*', $module, $mapping[1]);
        }
        $class .= str_replace('*', $presenterName, $mapping[2]);

        return $class;
    }
public function formatPresenterClass(string $presenter): string
    {
        if (isset($this->presenterMapping[$presenter])) {
            return $this->presenterMapping[$presenter];
        }

        $parts = explode(':', $presenter);
        $presenterName = (string) array_pop($parts);
        $modules = [];
        while (!isset($this->moduleMapping[implode(':', $parts)])) {
            array_unshift($modules, (string) array_pop($parts));
        }
        $mapping = $this->moduleMapping[implode(':', $parts)];

        $class = $mapping[0];
        foreach ($modules as $module) {
            $class .= str_replace('*', $module, $mapping[1]);
        }
        $class .= str_replace('*', $presenterName, $mapping[2]);

        return $class;
    }
public function formatPresenterClass ( string $ presenter ) : string { if ( isset ( $ this -> presenterMapping [ $ presenter ] ) ) { return $ this -> presenterMapping [ $ presenter ] ; } $ parts = explode ( ':' , $ presenter ) ; $ presenterName = ( string ) array_pop ( $ parts ) ; $ modules = [ ] ; while ( ! isset ( $ this -> moduleMapping [ implode ( ':' , $ parts ) ] ) ) { array_unshift ( $ modules , ( string ) array_pop ( $ parts ) ) ; } $ mapping = $ this -> moduleMapping [ implode ( ':' , $ parts ) ] ; $ class = $ mapping [ 0 ] ; foreach ( $ modules as $ module ) { $ class .= str_replace ( '*' , $ module , $ mapping [ 1 ] ) ; } $ class .= str_replace ( '*' , $ presenterName , $ mapping [ 2 ] ) ; return $ class ; }
Formats presenter class name from its name.

@param string $presenter
@return string
Formats presenter class name from its name .