/** */ protected function set_property($name, $value) { switch ($name) { case 'primary': case 'secondary': // set it $this->{$name} = $value; // chain it return $this; default: return parent::set_property($name, $value); } }
/** */ protected function set_property($name, $value) { switch ($name) { case 'alias': case 'ready': $this->{$name} = (bool) $value; break; case 'function': $this->function = is_bool($value) ? $value : trim($value); break; default: return parent::set_property($name, $value); } // chain it return $this; }