Flow\Token::test PHP Method

test() public method

public test ( $type, $values = null )
    public function test($type, $values = null)
    {
        if (is_null($values) && !is_int($type)) {
            $values = $type;
            $type = self::NAME;
        }
        return $this->type === $type && (is_null($values) || is_array($values) && in_array($this->value, $values) || $this->value == $values);
    }