eZ Publish  [4.0]
ezfiledirecthandler.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // Definition of eZFileDirectHandler class
00004 //
00005 // Created on: <30-Apr-2002 16:47:08 bf>
00006 //
00007 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00008 // SOFTWARE NAME: eZ Publish
00009 // SOFTWARE RELEASE: 4.0.x
00010 // COPYRIGHT NOTICE: Copyright (C) 1999-2008 eZ Systems AS
00011 // SOFTWARE LICENSE: GNU General Public License v2.0
00012 // NOTICE: >
00013 //   This program is free software; you can redistribute it and/or
00014 //   modify it under the terms of version 2.0  of the GNU General
00015 //   Public License as published by the Free Software Foundation.
00016 //
00017 //   This program is distributed in the hope that it will be useful,
00018 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //   GNU General Public License for more details.
00021 //
00022 //   You should have received a copy of version 2.0 of the GNU General
00023 //   Public License along with this program; if not, write to the Free
00024 //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00025 //   MA 02110-1301, USA.
00026 //
00027 //
00028 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00029 //
00030 
00031 /*!
00032   \class eZFileDirectHandler ezfiledirecthandler.php
00033   \ingroup eZBinaryHandlers
00034   \brief Handles file downloading by passing an URL directly to the file.
00035 
00036 */
00037 //include_once( "kernel/classes/datatypes/ezbinaryfile/ezbinaryfile.php" );
00038 //include_once( "kernel/classes/ezbinaryfilehandler.php" );
00039 
00040 class eZFileDirectHandler extends eZBinaryFileHandler
00041 {
00042     const HANDLER_ID = 'ezfiledirect';
00043 
00044     function eZFileDirectHandler()
00045     {
00046         $this->eZBinaryFileHandler( self::HANDLER_ID, "direct download", eZBinaryFileHandler::HANDLE_DOWNLOAD );
00047     }
00048 
00049     function handleFileDownload( $contentObject, $contentObjectAttribute, $type, $fileInfo )
00050     {
00051         return eZBinaryFileHandler::RESULT_OK;
00052     }
00053 
00054     /*!
00055      \reimp
00056      \return the direct download template suffix
00057     */
00058     function viewTemplate( $contentobjectAttribute )
00059     {
00060         $retValue = 'direct';
00061         return $retValue;
00062     }
00063 
00064 }
00065 
00066 ?>