Skip to content

Implement a whitelist filter #46

Description

@rick-nu

What

In the filter, you might only want to result a specific set of data. A white list will allow you to specify what keys you want to have returned in the end.

What is expected

$f = new Filter;
$f->whiteList(['first_name']);

$result = $f->filter([
  'first_name' => 'john',
  'spam' => 'spam'
]);
/**
 * array(1) {
 *     ["first_namet"]=> string(4) "john"
 * } 
 */

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions