public function setType($type = null)
    {
        $type = $this->calculateTypeValue($type);

        if (!is_int($type) || ($type < 0) || ($type > self::ALL)) {
            throw new Exception\InvalidArgumentException('Unknown type');
        }

        $this->options['type'] = $type;

        return $this;
    }
public function setType($type = null)
    {
        $type = $this->calculateTypeValue($type);

        if (!is_int($type) || ($type < 0) || ($type > self::ALL)) {
            throw new Exception\InvalidArgumentException('Unknown type');
        }

        $this->options['type'] = $type;

        return $this;
    }
public function setType ( $ type = null ) { $ type = $ this -> calculateTypeValue ( $ type ) ; if ( ! is_int ( $ type ) || ( $ type < 0 ) || ( $ type > self :: ALL ) ) { throw new Exception \ InvalidArgumentException ( 'Unknown type' ) ; } $ this -> options [ 'type' ] = $ type ; return $ this ; }
Sets types of values that are to be considered empty.

@param  int|array|null $type
@throws Exception\InvalidArgumentException
@return NotEmpty
Sets types of values that are to be considered empty .