type = (string) $type; // Set the optional public/private key strings. $this->private = isset($private) ? (string) $private : null; $this->public = isset($public) ? (string) $public : null; } /** * Magic method to return some protected property values. * * @param string $name The name of the property to return. * * @return mixed * * @since 12.1 */ public function __get($name) { if ($name == 'type') { return $this->type; } else { trigger_error('Cannot access property ' . __CLASS__ . '::' . $name, E_USER_WARNING); } } }