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

Source for file KeyWord.php

Documentation is available at KeyWord.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 keyword with file meta ids
  23.  * to which files its associated..
  24.  *
  25.  * @category   MediaSearch
  26.  * @package    MediaSearch_Model
  27.  * @copyright  Copyright (c) 2009 Sven Strittmatter
  28.  */
  29.     /**
  30.      * The keyword
  31.      *
  32.      * @access private
  33.      * @var string 
  34.      */
  35.     private $keyWord;
  36.     /**
  37.      * File meta ids.
  38.      * Represented as coma seperated string.
  39.      *
  40.      * @access private
  41.      * @var string 
  42.      */
  43.     private $fileMetaIds;
  44.  
  45.     /**
  46.      * Returns the keywords as coma separated string.
  47.      *
  48.      * @access public
  49.      * @return string 
  50.      */
  51.     public function getKeyWord({
  52.         return $this->keyWord;
  53.     }
  54.  
  55.     /**
  56.      * Sets the keyword.
  57.      *
  58.      * @access public
  59.      * @param string $string 
  60.      * @return MediaSearch_Model_KeyWord 
  61.      */
  62.     public function setKeyWord($string{
  63.         $this->keyWord $string;
  64.         return $this;
  65.     }
  66.  
  67.     /**
  68.      * Returns the file meta ids.
  69.      *
  70.      * @access public
  71.      * @return string 
  72.      */
  73.     public function getFileMetaIds({
  74.         return $this->fileMetaIds;
  75.     }
  76.  
  77.     /**
  78.      * Sets the file meta ids. They are expected as coma seperated string.
  79.      *
  80.      * @access public
  81.      * @param string $string 
  82.      * @return MediaSearch_Model_KeyWord 
  83.      */
  84.     public function setFileMetaIds($string{
  85.         $this->fileMetaIds $string;
  86.         return $this;
  87.     }
  88.  
  89.     /**
  90.      * Finds key word objects by their keyword. An array of keywords is expected.
  91.      *
  92.      * @access public
  93.      * @param array $keywords 
  94.      * @return array 
  95.      */
  96.     public function findByKeyWords(array $keywords{
  97.         return $this->getMapper()->findByKeyWords($keywords);
  98.     }
  99. }

Documentation generated on Mon, 17 Aug 2009 14:53:22 +0200 by phpDocumentor 1.4.2