src/db/Filter.php
/**
     * Applies filter on a given array and returns filtered data.
     *
     * @param array $data data to filter
     * @return array filtered data
     */
Applies filter on a given array and returns filtered data.
@param array $data data to filter
@return array filtered data
Applies filter on a given array and returns filtered data . @param array $data data to filter @return array filtered data
public function filter($data)
    {
        $filtered = [];
        foreach ($data as $row) {
            if(!is_array($row)){
                throw new \ErrorException('Check whether the machine is installed pcre-devel');
            }
            if ($this->passesFilter($row)) {
                $filtered[] = $row;
            }
        }
        return $filtered;
    }
public function filter ( $ data ) { $ filtered = [ ] ; foreach ( $ data as $ row ) { if ( ! is_array ( $ row ) ) { throw new \ ErrorException ( 'Check whether the machine is installed pcre-devel' ) ; } if ( $ this -> passesFilter ( $ row ) ) { $ filtered [ ] = $ row ; } } return $ filtered ; }
Applies filter on a given array and returns filtered data.
Applies filter on a given array and returns filtered data .