protected function setDefaultOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults(array(
                'host' => function(Options $options) {
                    if (isset($options['test']) && $options['test']) {
                        return 'https://test-api.pin.net.au';
                    }

                    return 'https://api.pin.net.au';
                }
            ))
            ->setRequired(array(
                'key'
            ))
            ->setDefined(array(
                'host',
                'test',
                'timeout',
            ))
            ->setAllowedTypes('host', 'string')
            ->setAllowedTypes('key', 'string')
            ->setAllowedTypes('test', 'bool')
            ->setAllowedTypes('timeout', 'int')
        ;
    }
protected function setDefaultOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults(array(
                'host' => function(Options $options) {
                    if (isset($options['test']) && $options['test']) {
                        return 'https://test-api.pin.net.au';
                    }

                    return 'https://api.pin.net.au';
                }
            ))
            ->setRequired(array(
                'key'
            ))
            ->setDefined(array(
                'host',
                'test',
                'timeout',
            ))
            ->setAllowedTypes('host', 'string')
            ->setAllowedTypes('key', 'string')
            ->setAllowedTypes('test', 'bool')
            ->setAllowedTypes('timeout', 'int')
        ;
    }
protected function setDefaultOptions ( OptionsResolver $ resolver ) { $ resolver -> setDefaults ( array ( 'host' => function ( Options $ options ) { if ( isset ( $ options [ 'test' ] ) && $ options [ 'test' ] ) { return 'https://test-api.pin.net.au' ; } return 'https://api.pin.net.au' ; } ) ) -> setRequired ( array ( 'key' ) ) -> setDefined ( array ( 'host' , 'test' , 'timeout' , ) ) -> setAllowedTypes ( 'host' , 'string' ) -> setAllowedTypes ( 'key' , 'string' ) -> setAllowedTypes ( 'test' , 'bool' ) -> setAllowedTypes ( 'timeout' , 'int' ) ; }
Set our default options.

@param OptionsResolver $resolver
Set our default options .