/** * {@inheritdoc} */ public function getDefault(OptionsInterface $options) { $factory = new Factory(); if ($options->defined('parameters')) { $factory->setDefaultParameters($options->parameters); } return $factory; }
/** * Sets the commands processors that need to be applied to the profile. * * @param OptionsInterface $options Client options. * @param ProfileInterface $profile Server profile. */ protected function setProcessors(OptionsInterface $options, ProfileInterface $profile) { if (isset($options->prefix) && $profile instanceof RedisProfile) { // NOTE: directly using __get('prefix') is actually a workaround for // HHVM 2.3.0. It's correct and respects the options interface, it's // just ugly. We will remove this hack when HHVM will fix re-entrant // calls to __get() once and for all. $profile->setProcessor($options->__get('prefix')); } }