protected static function executeFilter(array $filter, array $vars)
	{
		// Add vars from the registeredVars array to the list of vars
		$vars += ['registeredVars' => []];
		$vars += $vars['registeredVars'];

		// Prepare the list of arguments
		$args = [];
		if (isset($filter['params']))
		{
			foreach ($filter['params'] as $k => $v)
			{
				$args[] = (isset($vars[$k])) ? $vars[$k] : $v;
			}
		}

		return call_user_func_array($filter['callback'], $args);
	}
protected static function executeFilter(array $filter, array $vars)
	{
		// Add vars from the registeredVars array to the list of vars
		$vars += ['registeredVars' => []];
		$vars += $vars['registeredVars'];

		// Prepare the list of arguments
		$args = [];
		if (isset($filter['params']))
		{
			foreach ($filter['params'] as $k => $v)
			{
				$args[] = (isset($vars[$k])) ? $vars[$k] : $v;
			}
		}

		return call_user_func_array($filter['callback'], $args);
	}
protected static function executeFilter ( array $ filter , array $ vars ) { // Add vars from the registeredVars array to the list of vars $ vars += [ 'registeredVars' => [ ] ] ; $ vars += $ vars [ 'registeredVars' ] ; // Prepare the list of arguments $ args = [ ] ; if ( isset ( $ filter [ 'params' ] ) ) { foreach ( $ filter [ 'params' ] as $ k => $ v ) { $ args [ ] = ( isset ( $ vars [ $ k ] ) ) ? $ vars [ $ k ] : $ v ; } } return call_user_func_array ( $ filter [ 'callback' ] , $ args ) ; }
Execute a filter

@see s9e\TextFormatter\Configurator\Items\ProgrammableCallback

@param  array $filter Programmed callback
@param  array $vars   Variables to be used when executing the callback
@return mixed         Whatever the callback returns
Execute a filter