# \CWhitelist

Act as whitelist (or blacklist).

## Summary

Methods
Properties
Constants
set()
check()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$whitelist
N/A

File
  CWhitelist.php
Package
  Default
Class hierarchy
  \CWhitelist

## Tags

None found

## Properties

### $whitelist

    $whitelist :

Array to contain the whitelist options.

#### Type

#

## Tags

None found

## Methods

### set()

    set(array  $whitelist = array()) : $this

Set the whitelist from an array of strings, each item in the whitelist should be a regexp without the surrounding / or #.

#### Parameters

array | $whitelist | with all valid options, default is to clear the whitelist.

#### Returns

$this

#

## Tags

None found

### check()

    check(string  $item, array  $whitelist = null) : boolean

Check if item exists in the whitelist.

#### Parameters

string | $item | string to check.
array | $whitelist | optional with all valid options, default is null.

#### Returns

boolean —

true if item is in whitelist, else false.

#

## Tags

None found

### CWhitelist.php