One Hat Cyber Team
Your IP :
216.73.216.182
Server IP :
203.175.9.166
Server :
Linux tanggamus.iixcp.rumahweb.net 5.14.0-427.28.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 2 03:44:10 EDT 2024 x86_64
Server Software :
LiteSpeed
PHP Version :
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
cite5577
/
public_html
/
lib
/
pkp
/
classes
/
filter
/
View File Name :
GenericSequencerFilter.inc.php
<?php /** * @file classes/filter/GenericSequencerFilter.inc.php * * Copyright (c) 2014-2021 Simon Fraser University * Copyright (c) 2000-2021 John Willinsky * Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. * * @class GenericSequencerFilter * @ingroup filter * * @brief A generic filter that is configured with a number of * ordered filters. It takes the input argument of the first filter, * passes its output to the next filter and so on and finally returns * the result of the last filter in the chain to the caller. */ import('lib.pkp.classes.filter.CompositeFilter'); class GenericSequencerFilter extends CompositeFilter { /** * Constructor */ function __construct(&$filterGroup, $displayName = null) { parent::__construct($filterGroup, $displayName); } // // Implementing abstract template methods from PersistableFilter // /** * @see PersistableFilter::getClassName() */ function getClassName() { return 'lib.pkp.classes.filter.GenericSequencerFilter'; } // // Implementing abstract template methods from Filter // /** * @see Filter::process() * @param $input mixed * @return mixed */ function &process(&$input) { // Iterate over all filters and always feed the // output of one filter as input to the next // filter. $previousOutput = null; foreach($this->getFilters() as $filter) { if(is_null($previousOutput)) { // First filter $previousOutput =& $input; } $output = $filter->execute($previousOutput); // Propagate errors of sub-filters (if any) foreach($filter->getErrors() as $errorMessage) $this->addError($errorMessage); // If one filter returns null then we'll abort // execution of the filter chain. if (is_null($output)) break; unset($previousOutput); $previousOutput = $output; } return $output; } }