__get() public method

Returns the value of the given option.
public __get ( string $option ) : mixed | null
$option string Name of the option.
return mixed | null
Esempio n. 1
0
 /**
  * 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'));
     }
 }