Utility Classes :: IsNoneOf

Overview

The IsNoneOf class is used when specifying what you want is harder than stating what you don't want.

The IsNoneOf() constructor must be passed at least one type, user-defined class or registered extension class. For example:

IsNoneOf(IsCallable())

Where IsCallable is the IsCallable utility class. This signature will accept any object that IsCallable() rejects.

Similarly, if multiple conditions are provided, each of them must reject the object being checked. In the next example, an object will match the signature if it is neither callable nor has a foo attribute:

IsNoneOf(IsCallable(), HasAttr(['foo']))

Read about the HasAttr utility class at its manual page.

Details

Valid XHTML 1.0 Transitional