src/core/framework/core/3rdparty/ezcomponents/Cache/src/storage/file.php
public function generateIdentifier( $id, $attributes = null )
    {
        $filename = (string) $id;
        $illegalFileNameChars = array(
            ' '  => '_',
            '/'  => DIRECTORY_SEPARATOR,
            '\\' => DIRECTORY_SEPARATOR,
        );
        $filename = strtr( $filename, $illegalFileNameChars );

        // Chars used for filename concatination
        $illegalChars = array(
            '-' => '#',
            ' ' => '%',
            '=' => '+',
            '.' => '+',
        );
        if ( is_array( $attributes ) && count( $attributes ) > 0 )
        {
            ksort( $attributes );
            foreach ( $attributes as $key => $val )
            {
                $attrStr = '-' . strtr( $key, $illegalChars )
                         . '=' . strtr( $val, $illegalChars );
                if ( strlen( $filename . $attrStr ) > 250 )
                {
                    // Max filename length
                    break;
                }
                $filename .= $attrStr;
            }
        }
        else
        {
            $filename .= '-';
        }
        return $filename . $this->properties['options']['extension'];
    }
public function generateIdentifier( $id, $attributes = null )
    {
        $filename = (string) $id;
        $illegalFileNameChars = array(
            ' '  => '_',
            '/'  => DIRECTORY_SEPARATOR,
            '\\' => DIRECTORY_SEPARATOR,
        );
        $filename = strtr( $filename, $illegalFileNameChars );

        // Chars used for filename concatination
        $illegalChars = array(
            '-' => '#',
            ' ' => '%',
            '=' => '+',
            '.' => '+',
        );
        if ( is_array( $attributes ) && count( $attributes ) > 0 )
        {
            ksort( $attributes );
            foreach ( $attributes as $key => $val )
            {
                $attrStr = '-' . strtr( $key, $illegalChars )
                         . '=' . strtr( $val, $illegalChars );
                if ( strlen( $filename . $attrStr ) > 250 )
                {
                    // Max filename length
                    break;
                }
                $filename .= $attrStr;
            }
        }
        else
        {
            $filename .= '-';
        }
        return $filename . $this->properties['options']['extension'];
    }
public function generateIdentifier ( $ id , $ attributes = null ) { $ filename = ( string ) $ id ; $ illegalFileNameChars = array ( ' ' => '_' , '/' => DIRECTORY_SEPARATOR , '\\' => DIRECTORY_SEPARATOR , ) ; $ filename = strtr ( $ filename , $ illegalFileNameChars ) ; // Chars used for filename concatination $ illegalChars = array ( '-' => '#' , ' ' => '%' , '=' => '+' , '.' => '+' , ) ; if ( is_array ( $ attributes ) && count ( $ attributes ) > 0 ) { ksort ( $ attributes ) ; foreach ( $ attributes as $ key => $ val ) { $ attrStr = '-' . strtr ( $ key , $ illegalChars ) . '=' . strtr ( $ val , $ illegalChars ) ; if ( strlen ( $ filename . $ attrStr ) > 250 ) { // Max filename length break ; } $ filename .= $ attrStr ; } } else { $ filename .= '-' ; } return $ filename . $ this -> properties [ 'options' ] [ 'extension' ] ; }
Generate the storage internal identifier from ID and attributes.

Generates the storage internal identifier out of the provided ID and the
attributes. This is the default implementation and can be overloaded if
necessary.

@param string $id                         The ID.
@param array(string=>string) $attributes  Attributes describing the
data to restore.
@return string              The generated identifier
Generate the storage internal identifier from ID and attributes .