original_string: public function register($type, $class, $legacy = false)
  	{
  		if (!@is_subclass_of($class, $this->default[$type]))
  		{
  			return false;
  		}
  
  		$this->classes[$type] = $class;
  
  		if ($legacy)
  		{
  			$this->legacy[] = $class;
  		}
  
  		return true;
  	}
code: public function register($type, $class, $legacy = false)
  	{
  		if (!@is_subclass_of($class, $this->default[$type]))
  		{
  			return false;
  		}
  
  		$this->classes[$type] = $class;
  
  		if ($legacy)
  		{
  			$this->legacy[] = $class;
  		}
  
  		return true;
  	}
code_tokens: public function register ( $ type , $ class , $ legacy = false ) { if ( ! @ is_subclass_of ( $ class , $ this -> default [ $ type ] ) ) { return false ; } $ this -> classes [ $ type ] = $ class ; if ( $ legacy ) { $ this -> legacy [ ] = $ class ; } return true ; }
docstring: Register a class
  
  @param string $type See {@see $default} for names
  @param string $class Class name, must subclass the corresponding default
  @param bool $legacy Whether to enable legacy support for this class
  @return bool Successfulness
docstring_tokens: Register a class