[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/net/src/ -> lmbUploadedFile.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  lmb_require('limb/core/src/lmbObject.class.php');
  10  
  11  /**

  12   * class lmbUploadedFile.

  13   *

  14   * @package net

  15   * @version $Id$

  16   */
  17  class lmbUploadedFile extends lmbObject
  18  {
  19    function getFilePath()
  20    {
  21      return $this->getTmpName();
  22    }
  23  
  24    function getMimeType()
  25    {
  26      return $this->getType();
  27    }
  28  
  29    function move($dest)
  30    {
  31      move_uploaded_file($this->getTmpName(), $dest);
  32    }
  33  
  34    function isUploaded()
  35    {
  36      return is_uploaded_file($this->getTmpName());
  37    }
  38  
  39    function isValid()
  40    {
  41      return $this->getError() == UPLOAD_ERR_OK;
  42    }
  43  
  44    function getContents()
  45    {
  46      return file_get_contents($this->getTmpName());
  47    }
  48  
  49    function destroy()
  50    {
  51      unlink($this->getTmpName());
  52    }
  53  }
  54  
  55  ?>


Generated: Fri Aug 29 04:49:26 2008 Cross-referenced by PHPXref 0.7