protected function doApplyFilters(array $results, Server $server)
    {

        // Loop over the filters
        foreach ($this->options['filters'] as $filterOptions) {
            // Try to do this filter
            try {
                // Make a new reflection class
                $class = new \ReflectionClass(sprintf('GameQ\\Filters\\%s', ucfirst($filterOptions['filter'])));

                // Create a new instance of the filter class specified
                $filter = $class->newInstanceArgs([$filterOptions['options']]);

                // Apply the filter to the data
                $results = $filter->apply($results, $server);
            } catch (\ReflectionException $e) {
                // Invalid, skip it
                continue;
            }
        }

        return $results;
    }
protected function doApplyFilters(array $results, Server $server)
    {

        // Loop over the filters
        foreach ($this->options['filters'] as $filterOptions) {
            // Try to do this filter
            try {
                // Make a new reflection class
                $class = new \ReflectionClass(sprintf('GameQ\\Filters\\%s', ucfirst($filterOptions['filter'])));

                // Create a new instance of the filter class specified
                $filter = $class->newInstanceArgs([$filterOptions['options']]);

                // Apply the filter to the data
                $results = $filter->apply($results, $server);
            } catch (\ReflectionException $e) {
                // Invalid, skip it
                continue;
            }
        }

        return $results;
    }
protected function doApplyFilters ( array $ results , Server $ server ) { // Loop over the filters foreach ( $ this -> options [ 'filters' ] as $ filterOptions ) { // Try to do this filter try { // Make a new reflection class $ class = new \ ReflectionClass ( sprintf ( 'GameQ\\Filters\\%s' , ucfirst ( $ filterOptions [ 'filter' ] ) ) ) ; // Create a new instance of the filter class specified $ filter = $ class -> newInstanceArgs ( [ $ filterOptions [ 'options' ] ] ) ; // Apply the filter to the data $ results = $ filter -> apply ( $ results , $ server ) ; } catch ( \ ReflectionException $ e ) { // Invalid, skip it continue ; } } return $ results ; }
Apply any filters to the results

@param array         $results
@param \GameQ\Server $server

@return array
Apply any filters to the results