public function setOptionsFlag($options) { if (in_array($options, self::FLAGS) === false) { throw new InvalidArgumentException(sprintf("The GPO options flag must be a value 0 - 3, got: %s", $options)); } $this->options = $options; return $this; }