[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZContentUploadHandler class 4 // 5 // Created on: <18-Mar-2005 18:14:02 amos> 6 // 7 // SOFTWARE NAME: eZ publish 8 // SOFTWARE RELEASE: 3.9.0 9 // BUILD VERSION: 17785 10 // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS 11 // SOFTWARE LICENSE: GNU General Public License v2.0 12 // NOTICE: > 13 // This program is free software; you can redistribute it and/or 14 // modify it under the terms of version 2.0 of the GNU General 15 // Public License as published by the Free Software Foundation. 16 // 17 // This program is distributed in the hope that it will be useful, 18 // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 // GNU General Public License for more details. 21 // 22 // You should have received a copy of version 2.0 of the GNU General 23 // Public License along with this program; if not, write to the Free 24 // Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 25 // MA 02110-1301, USA. 26 // 27 // 28 29 /*! \file ezcontentuploadhandler.php 30 */ 31 32 /*! 33 \class eZContentUploadHandler ezcontentuploadhandler.php 34 \brief Interface for all content upload handlers 35 36 This defines the interface for upload handlers for content objects. The handler 37 will be used if upload.ini is configured for a specific MIME type. 38 The uploading system is general and will be used both by Web uploads as well 39 as WebDAV PUT requests. 40 41 The handler must inherit this class and implement the following methods: 42 - handleFile() - This takes care of creating content objects from the uploaded file. 43 44 Also the constructor must pass a proper name and identifier to the eZContentUploadHandler. 45 46 */ 47 48 class eZContentUploadHandler 49 { 50 /*! 51 Initialises the handler with the name. 52 */ 53 function eZContentUploadHandler( $name, $identifier ) 54 { 55 $this->Name = $name; 56 $this->Identifier = $identifier; 57 } 58 59 /*! 60 \pure 61 Handles the file \a $filePath and creates one ore more content objects. 62 63 \param $upload The eZContentUpload object that instantiated the request, public methods on this can be used. 64 \param $filePath Path to file which should be stored, do not remove or move this file. 65 \param $mimeInfo Contains MIME-Type information on the file. 66 \param $result Result data, will be filled with information which the client can examine, contains: 67 - errors - An array with errors, each element is an array with \c 'description' containing the text 68 \param $location The node ID which the new object will be placed or the string \c 'auto' for automatic placement of type. 69 \param $existingNode Pass a contentobjecttreenode object to let the uploading be done to an existing object, 70 if not it will create one from scratch. 71 72 \return \c false if something failed or \c true if succesful. 73 \note might be transaction unsafe. 74 */ 75 function handleFile( &$upload, &$result, 76 $filePath, $originalFilename, $mimeInfo, 77 $location, $existingNode ) 78 { 79 return false; 80 } 81 82 /// \privatesection 83 /// The name of the handler, can be displayed to the end user. 84 var $Name; 85 /// The identifier of the handler. 86 var $Identifier; 87 } 88 89 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |