MediaSearch_Model
[ class tree: MediaSearch_Model ] [ index: MediaSearch_Model ] [ all elements ]

Source for file FileMeta.php

Documentation is available at FileMeta.php

  1. <?php
  2. /**
  3.  * MediaSearch
  4.  *
  5.  * LICENSE
  6.  *
  7.  * "THE BEER-WARE LICENSE" (Revision 42):
  8.  * "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
  9.  * As long as you retain this notice you can do whatever you want with
  10.  * this stuff. If we meet some day, and you think this stuff is worth it,
  11.  * you can buy me a beer in return.
  12.  *
  13.  * $Author$
  14.  * $Revision$
  15.  *
  16.  * @category    MediaSearch
  17.  * @package     MediaSearch_Model
  18.  * @copyright   Copyright (c) 2009 Sven Strittmatter
  19.  */
  20.  
  21. /**
  22.  * This model class represents a single file with its metadata.
  23.  *
  24.  * @category   MediaSearch
  25.  * @package    MediaSearch_Model
  26.  * @copyright  Copyright (c) 2009 Sven Strittmatter
  27.  */
  28.     /**
  29.      * Type of file.
  30.      *
  31.      * @access private
  32.      * @var int 
  33.      */
  34.     private $fileType;
  35.     /**
  36.      * The file name.
  37.      *
  38.      * @access private
  39.      * @var string 
  40.      */
  41.     private $fileName;
  42.     /**
  43.      * The file path.
  44.      *
  45.      * @access private
  46.      * @var string 
  47.      */
  48.     private $filePath;
  49.     /**
  50.      * File size in bytes.
  51.      *
  52.      * @access private
  53.      * @var int 
  54.      */
  55.     private $fileSize;
  56.     /**
  57.      * Modification date as timestamp
  58.      *
  59.      * @access private
  60.      * @var int 
  61.      */
  62.     private $modificationDate;
  63.     /**
  64.      * Creation date as timestamp
  65.      *
  66.      * @access private
  67.      * @var int 
  68.      */
  69.     private $creationDate;
  70.     /**
  71.      * The found keywords for this file as coma seperated string.
  72.      *
  73.      * @access private
  74.      * @var string 
  75.      */
  76.     private $keyWords;
  77.     /**
  78.      * Last update of data record as timestamp.
  79.      *
  80.      * @access private
  81.      * @var int 
  82.      */
  83.     private $lastUpdate;
  84.  
  85.     /**
  86.      * Returns the file type.
  87.      *
  88.      * @access public
  89.      * @return int 
  90.      */
  91.     public function getFileType({
  92.         return $this->fileType;
  93.     }
  94.  
  95.     /**
  96.      * Sets the file type.
  97.      *
  98.      * @access public
  99.      * @param int $int 
  100.      * @return MediaSearch_Model_FileMeta 
  101.      */
  102.     public function setFileType($int{
  103.         $this->fileType $int;
  104.         return $this;
  105.     }
  106.  
  107.     /**
  108.      * Returns the file name.
  109.      *
  110.      * @access public
  111.      * @return string 
  112.      */
  113.     public function getFileName({
  114.         return $this->fileName;
  115.     }
  116.  
  117.     /**
  118.      * Sets the file name.
  119.      *
  120.      * @access public
  121.      * @param string $string 
  122.      * @return MediaSearch_Model_FileMeta 
  123.      */
  124.     public function setFileName($string{
  125.         $this->fileName $string;
  126.         return $this;
  127.     }
  128.  
  129.     /**
  130.      * Returns the file path.
  131.      *
  132.      * @access public
  133.      * @return string 
  134.      */
  135.     public function getFilePath({
  136.         return $this->filePath;
  137.     }
  138.  
  139.     /**
  140.      * Sets the file path.
  141.      *
  142.      * @access public
  143.      * @param string $string 
  144.      * @return MediaSearch_Model_FileMeta 
  145.      */
  146.     public function setFilePath($string{
  147.         $this->filePath $string;
  148.         return $this;
  149.     }
  150.  
  151.     /**
  152.      * Returns the file size in bytes.
  153.      *
  154.      * @access public
  155.      * @return int 
  156.      */
  157.     public function getFileSize({
  158.         return $this->fileSize;
  159.     }
  160.  
  161.     /**
  162.      * Sets the file size in bytes.
  163.      *
  164.      * @access public
  165.      * @param int $int 
  166.      * @return MediaSearch_Model_FileMeta 
  167.      */
  168.     public function setFileSize($int{
  169.         $this->fileSize $int;
  170.         return $this;
  171.     }
  172.  
  173.     /**
  174.      * Returns the modification date.
  175.      *
  176.      * @access public
  177.      * @return int 
  178.      */
  179.     public function getModificationDate({
  180.         return $this->modificationDate;
  181.     }
  182.  
  183.     /**
  184.      * Sets the modofication date.
  185.      *
  186.      * @access public
  187.      * @param int $ts 
  188.      * @return MediaSearch_Model_FileMeta 
  189.      */
  190.     public function setModificationDate($ts{
  191.         $this->modificationDate $ts;
  192.         return $this;
  193.     }
  194.  
  195.     /**
  196.      * Returns the creation date.
  197.      *
  198.      * @access public
  199.      * @return int 
  200.      */
  201.     public function getCreationDate({
  202.         return $this->creationDate;
  203.     }
  204.  
  205.     /**
  206.      * Sets the creation date.
  207.      *
  208.      * @access public
  209.      * @param int $ts 
  210.      * @return MediaSearch_Model_FileMeta 
  211.      */
  212.     public function setCreationDate($ts{
  213.         $this->creationDate $ts;
  214.         return $this;
  215.     }
  216.  
  217.     /**
  218.      * Returns the keywords.
  219.      *
  220.      * @access public
  221.      * @return string 
  222.      */
  223.     public function getKeyWords({
  224.         return $this->keyWords;
  225.     }
  226.  
  227.     /**
  228.      * Sets the keywords. They are expected as coma seperated list.
  229.      *
  230.      * @access public
  231.      * @param string $string 
  232.      * @return MediaSearch_Model_FileMeta 
  233.      */
  234.     public function setKeyWords($string{
  235.         $this->keyWords $string;
  236.         return $this;
  237.     }
  238.  
  239.     /**
  240.      * Returns the last update date.
  241.      *
  242.      * @access public
  243.      * @return int 
  244.      */
  245.     public function getLastUpdate({
  246.         return $this->lastUpdate;
  247.     }
  248.  
  249.     /**
  250.      * Sets the last updqate time.
  251.      *
  252.      * @access public
  253.      * @param int $ts 
  254.      * @return MediaSearch_Model_FileMeta 
  255.      */
  256.     public function setLastUpdate($ts{
  257.         $this->lastUpdate $ts;
  258.         return $this;
  259.     }
  260.  
  261.     /**
  262.      * Finds data objects by an array of ids and optional types.
  263.      *
  264.      * @access public
  265.      * @param array $primaryKeys 
  266.      * @param array $types 
  267.      * @return array 
  268.      */
  269.     public function findByIdAndTypes(array $primaryKeysarray $types null{
  270.         return $this->getMapper()->findByIdAndTypes($primaryKeys$types);
  271.     }
  272. }

Documentation generated on Mon, 17 Aug 2009 14:52:48 +0200 by phpDocumentor 1.4.2