protected function buildOptions(array $defaults = null)
    {
        $options = $this->getOptions();

        if ($defaults) $options = array_merge($defaults, $options);

        foreach ($options as $option) {
            if ( ! array_key_exists($option, $this->options)) continue;

            if ( ! isset($optionsBitwise)) {
                $optionsBitwise = $this->options[$option];
                continue;
            }

            $optionsBitwise = $optionsBitwise | $this->options[$option];
        }

        return isset($optionsBitwise) ? $optionsBitwise : null;
    }