public function validate($value)
        {
            if (!in_array(gettype($value), $this->types)) {
                throw new Exception('Type of value "'.gettype($value)."' is not compatible with ".get_class($this));
            }
        }
public function validate($value)
        {
            if (!in_array(gettype($value), $this->types)) {
                throw new Exception('Type of value "'.gettype($value)."' is not compatible with ".get_class($this));
            }
        }
public function validate ( $ value ) { if ( ! in_array ( gettype ( $ value ) , $ this -> types ) ) { throw new Exception ( 'Type of value "' . gettype ( $ value ) . "' is not compatible with " . get_class ( $ this ) ) ; } }
Validate a variables type to make sure our class can use it.

@param string $value
@throws Exception
Validate a variables type to make sure our class can use it .