[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/web_spider/src/ -> lmbContentTypeFilter.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  
  10  /**

  11   * class lmbContentTypeFilter.

  12   *

  13   * @package web_spider

  14   * @version $Id: lmbContentTypeFilter.class.php 5945 2007-06-06 08:31:43Z pachanga $

  15   */
  16  class lmbContentTypeFilter
  17  {
  18    protected $allowed_types;
  19  
  20    function lmbContentTypeFilter()
  21    {
  22      $this->reset();
  23    }
  24  
  25    function reset()
  26    {
  27      $this->allowed_types = array();
  28    }
  29  
  30    function allowContentType($type)
  31    {
  32      $this->allowed_types[] = strtolower($type);
  33    }
  34  
  35    function canPass($type)
  36    {
  37      if(!in_array($type, $this->allowed_types))
  38        return false;
  39  
  40      return true;
  41    }
  42  }
  43  
  44  ?>


Generated: Sat Sep 6 04:46:52 2008 Cross-referenced by PHPXref 0.7