function generateTitle($format='%label%: %name% %extra%')
    {
        $translate = [
            '%label%' => $this->isInterface() ? 'Interface' : 'Class',
            '%name%' => substr_count($this->getName(), '\\') == 1 ? substr($this->getName(), 1) : $this->getName(),
            '%extra%' => ''
        ];

        if( strpos($format, '%label%') === false ) {
            if( $this->isInterface() )
                $translate['%extra%'] = '(interface)';
            elseif( $this->isAbstract() )
                $translate['%extra%'] = '(abstract)';
        } else {
            $translate['%extra%'] = $this->isAbstract() && !$this->isInterface() ? '(abstract)' : '';
        }

        return trim(strtr($format, $translate));
    }
function generateTitle($format='%label%: %name% %extra%')
    {
        $translate = [
            '%label%' => $this->isInterface() ? 'Interface' : 'Class',
            '%name%' => substr_count($this->getName(), '\\') == 1 ? substr($this->getName(), 1) : $this->getName(),
            '%extra%' => ''
        ];

        if( strpos($format, '%label%') === false ) {
            if( $this->isInterface() )
                $translate['%extra%'] = '(interface)';
            elseif( $this->isAbstract() )
                $translate['%extra%'] = '(abstract)';
        } else {
            $translate['%extra%'] = $this->isAbstract() && !$this->isInterface() ? '(abstract)' : '';
        }

        return trim(strtr($format, $translate));
    }
function generateTitle ( $ format = '%label%: %name% %extra%' ) { $ translate = [ '%label%' => $ this -> isInterface ( ) ? 'Interface' : 'Class' , '%name%' => substr_count ( $ this -> getName ( ) , '\\' ) == 1 ? substr ( $ this -> getName ( ) , 1 ) : $ this -> getName ( ) , '%extra%' => '' ] ; if ( strpos ( $ format , '%label%' ) === false ) { if ( $ this -> isInterface ( ) ) $ translate [ '%extra%' ] = '(interface)' ; elseif ( $ this -> isAbstract ( ) ) $ translate [ '%extra%' ] = '(abstract)' ; } else { $ translate [ '%extra%' ] = $ this -> isAbstract ( ) && ! $ this -> isInterface ( ) ? '(abstract)' : '' ; } return trim ( strtr ( $ format , $ translate ) ) ; }
Generate a title describing the class this object is referring to
@param string $format
@return string
Generate a title describing the class this object is referring to