public function setBroker(array $options)
    {
        $namespace = self::RHUBARB_BROKER_NAMESPACE;
        if (isset($options['class_namespace']) && $options['class_namespace']) {
            $namespace = $options['class_namespace'];
        }
        $namespace = rtrim($namespace, self::NS_SEPERATOR);
        $brokerClass = $namespace . self::NS_SEPERATOR . $options['type'];
        if (!class_exists($brokerClass)) {
            throw new Exception(
                sprintf('Broker class [%s] unknown', $brokerClass)
            );
        }
        $reflect = new \ReflectionClass($brokerClass);
        $this->broker = $reflect->newInstanceArgs(array((array)@$options['options']));

        return $this;
    }
public function setBroker(array $options)
    {
        $namespace = self::RHUBARB_BROKER_NAMESPACE;
        if (isset($options['class_namespace']) && $options['class_namespace']) {
            $namespace = $options['class_namespace'];
        }
        $namespace = rtrim($namespace, self::NS_SEPERATOR);
        $brokerClass = $namespace . self::NS_SEPERATOR . $options['type'];
        if (!class_exists($brokerClass)) {
            throw new Exception(
                sprintf('Broker class [%s] unknown', $brokerClass)
            );
        }
        $reflect = new \ReflectionClass($brokerClass);
        $this->broker = $reflect->newInstanceArgs(array((array)@$options['options']));

        return $this;
    }
public function setBroker ( array $ options ) { $ namespace = self :: RHUBARB_BROKER_NAMESPACE ; if ( isset ( $ options [ 'class_namespace' ] ) && $ options [ 'class_namespace' ] ) { $ namespace = $ options [ 'class_namespace' ] ; } $ namespace = rtrim ( $ namespace , self :: NS_SEPERATOR ) ; $ brokerClass = $ namespace . self :: NS_SEPERATOR . $ options [ 'type' ] ; if ( ! class_exists ( $ brokerClass ) ) { throw new Exception ( sprintf ( 'Broker class [%s] unknown' , $ brokerClass ) ) ; } $ reflect = new \ ReflectionClass ( $ brokerClass ) ; $ this -> broker = $ reflect -> newInstanceArgs ( array ( ( array ) @ $ options [ 'options' ] ) ) ; return $ this ; }
Accepts an array of options enabling the declaration and instantiation of the broker object.

@param array $options

@return Rhubarb
@throws Exception
Accepts an array of options enabling the declaration and instantiation of the broker object .