private static function filter($variable, IFilter $filter = null) { if ($filter === null) { return $variable; } return $filter->run($variable); }