kernel/classes/datatypes/ezimage/ezimagealiashandler.php
function initializeFromHTTPFile( $httpFile, $imageAltText = false )
    {
        $this->increaseImageSerialNumber();

        $mimeData = eZMimeType::findByFileContents( $httpFile->attribute( 'filename' ) );
        if ( !$mimeData['is_valid'] )
        {
            $mimeData = eZMimeType::findByName( $httpFile->attribute( 'mime_type' ) );
            if ( !$mimeData['is_valid'] )
            {
                $mimeData = eZMimeType::findByURL( $httpFile->attribute( 'original_filename' ) );
            }
        }
        $this->removeAliases();
        $this->setOriginalAttributeDataValues( $this->ContentObjectAttributeData['id'],
                                               $this->ContentObjectAttributeData['version'],
                                               $this->ContentObjectAttributeData['language_code'] );
        $contentVersion = eZContentObjectVersion::fetchVersion( $this->ContentObjectAttributeData['version'],
                                                                $this->ContentObjectAttributeData['contentobject_id'] );
        $objectName = $this->imageName( $this->ContentObjectAttributeData, $contentVersion );
        $objectPathString = $this->imagePath( $this->ContentObjectAttributeData, $contentVersion, true );

        eZMimeType::changeBaseName( $mimeData, $objectName );
        eZMimeType::changeDirectoryPath( $mimeData, $objectPathString );

        $httpFile->store( false, false, $mimeData );

        $originalFilename = $httpFile->attribute( 'original_filename' );
        return $this->initialize( $mimeData, $originalFilename, $imageAltText );
    }
function initializeFromHTTPFile( $httpFile, $imageAltText = false )
    {
        $this->increaseImageSerialNumber();

        $mimeData = eZMimeType::findByFileContents( $httpFile->attribute( 'filename' ) );
        if ( !$mimeData['is_valid'] )
        {
            $mimeData = eZMimeType::findByName( $httpFile->attribute( 'mime_type' ) );
            if ( !$mimeData['is_valid'] )
            {
                $mimeData = eZMimeType::findByURL( $httpFile->attribute( 'original_filename' ) );
            }
        }
        $this->removeAliases();
        $this->setOriginalAttributeDataValues( $this->ContentObjectAttributeData['id'],
                                               $this->ContentObjectAttributeData['version'],
                                               $this->ContentObjectAttributeData['language_code'] );
        $contentVersion = eZContentObjectVersion::fetchVersion( $this->ContentObjectAttributeData['version'],
                                                                $this->ContentObjectAttributeData['contentobject_id'] );
        $objectName = $this->imageName( $this->ContentObjectAttributeData, $contentVersion );
        $objectPathString = $this->imagePath( $this->ContentObjectAttributeData, $contentVersion, true );

        eZMimeType::changeBaseName( $mimeData, $objectName );
        eZMimeType::changeDirectoryPath( $mimeData, $objectPathString );

        $httpFile->store( false, false, $mimeData );

        $originalFilename = $httpFile->attribute( 'original_filename' );
        return $this->initialize( $mimeData, $originalFilename, $imageAltText );
    }
function initializeFromHTTPFile ( $ httpFile , $ imageAltText = false ) { $ this -> increaseImageSerialNumber ( ) ; $ mimeData = eZMimeType :: findByFileContents ( $ httpFile -> attribute ( 'filename' ) ) ; if ( ! $ mimeData [ 'is_valid' ] ) { $ mimeData = eZMimeType :: findByName ( $ httpFile -> attribute ( 'mime_type' ) ) ; if ( ! $ mimeData [ 'is_valid' ] ) { $ mimeData = eZMimeType :: findByURL ( $ httpFile -> attribute ( 'original_filename' ) ) ; } } $ this -> removeAliases ( ) ; $ this -> setOriginalAttributeDataValues ( $ this -> ContentObjectAttributeData [ 'id' ] , $ this -> ContentObjectAttributeData [ 'version' ] , $ this -> ContentObjectAttributeData [ 'language_code' ] ) ; $ contentVersion = eZContentObjectVersion :: fetchVersion ( $ this -> ContentObjectAttributeData [ 'version' ] , $ this -> ContentObjectAttributeData [ 'contentobject_id' ] ) ; $ objectName = $ this -> imageName ( $ this -> ContentObjectAttributeData , $ contentVersion ) ; $ objectPathString = $ this -> imagePath ( $ this -> ContentObjectAttributeData , $ contentVersion , true ) ; eZMimeType :: changeBaseName ( $ mimeData , $ objectName ) ; eZMimeType :: changeDirectoryPath ( $ mimeData , $ objectPathString ) ; $ httpFile -> store ( false , false , $ mimeData ) ; $ originalFilename = $ httpFile -> attribute ( 'original_filename' ) ; return $ this -> initialize ( $ mimeData , $ originalFilename , $ imageAltText ) ; }
Initializes the content object attribute with the uploaded HTTP file

@param eZHTTPFile $httpFile
@param string $imageAltText Optional image ALT text

@return TODO: FIXME
Initializes the content object attribute with the uploaded HTTP file