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

Source for file Chain.php

Documentation is available at Chain.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_Filter_File
  18.  * @copyright   Copyright (c) 2009 Sven Strittmatter
  19.  */
  20.  
  21. /**
  22.  * @see MediaSearch_Filter_AbstractChain
  23.  */
  24. require_once('MediaSearch/Filter/AbstractChain.php');
  25.  
  26. /**
  27.  * @see MediaSearch_Filter_Interceptor_Interface
  28.  */
  29. require_once('MediaSearch/Filter/File/Interface.php');
  30.  
  31. /**
  32.  * Concrete implementation of MediaSearch_Filter_AbstractChain for chaining
  33.  * file filters.
  34.  *
  35.  * @category   MediaSearch
  36.  * @package    MediaSearch_Filter_File
  37.  * @copyright  Copyright (c) 2009 Sven Strittmatter
  38.  */
  39.                                     implements MediaSearch_Filter_File_Interface {
  40.     const TRACE_LEVEL = 28;
  41.  
  42.     /**
  43.      * Proceses one single SplFileInfo object on all added filters.
  44.      *
  45.      * @access public
  46.      * @param SplFileInfo $fileInfo 
  47.      */
  48.     public function process(SplFileInfo $fileInfo{
  49.         MediaSearch_Log::trace('Processing filters...'self::TRACE_LEVEL);
  50.  
  51.         if (!$this->hasFilter()) {
  52.             MediaSearch_Log::warn('Doesnt have filters in chain!');
  53.             return;
  54.         }
  55.  
  56.         foreach ($this->getFilters(as $filter{
  57.             $filter->process($req$res);
  58.         }
  59.  
  60.         MediaSearch_log::trace('Processing finished.'self::TRACE_LEVEL);
  61.     }
  62. }

Documentation generated on Mon, 17 Aug 2009 14:51:45 +0200 by phpDocumentor 1.4.2