kernel/classes/eznamepatternresolver.php
public function resolveNamePattern( $limit = 0, $sequence = '' )
    {
        // Fetch attributes for present identifiers
        $this->fetchContentAttributes();

        // Replace tokens with real values
        $objectName = $this->translatePattern();

        $db = eZDB::instance();

        $limit = $limit ?: self::FIELD_NAME_MAX_SIZE;

        if ( $db->countStringSize( $objectName ) <= $limit )
        {
            return $objectName;
        }

        return preg_replace(
            "/[\pZ\pC]+$/u",
            '',
            $db->truncateString( $objectName, $limit, 'name', $sequence )
        ). $sequence;
    }
public function resolveNamePattern( $limit = 0, $sequence = '' )
    {
        // Fetch attributes for present identifiers
        $this->fetchContentAttributes();

        // Replace tokens with real values
        $objectName = $this->translatePattern();

        $db = eZDB::instance();

        $limit = $limit ?: self::FIELD_NAME_MAX_SIZE;

        if ( $db->countStringSize( $objectName ) <= $limit )
        {
            return $objectName;
        }

        return preg_replace(
            "/[\pZ\pC]+$/u",
            '',
            $db->truncateString( $objectName, $limit, 'name', $sequence )
        ). $sequence;
    }
public function resolveNamePattern ( $ limit = 0 , $ sequence = '' ) { // Fetch attributes for present identifiers $ this -> fetchContentAttributes ( ) ; // Replace tokens with real values $ objectName = $ this -> translatePattern ( ) ; $ db = eZDB :: instance ( ) ; $ limit = $ limit ? : self :: FIELD_NAME_MAX_SIZE ; if ( $ db -> countStringSize ( $ objectName ) <= $ limit ) { return $ objectName ; } return preg_replace ( "/[\pZ\pC]+$/u" , '' , $ db -> truncateString ( $ objectName , $ limit , 'name' , $ sequence ) ) . $ sequence ; }
Return the real name for an object name pattern

@param int $limit The limit on the string length, by defaul 0 aka none
@param string $sequence End sequence applied to string if limit has been reached
@return string
Return the real name for an object name pattern