code: private function initRenderer($var)
      {
          if ($var instanceof Renderer) {
              return $var;
          }
          if ($var === null) {
              return null;
          }
          
          $type     = strtolower(Values::stringValue($var));
          $xmlList  = array("xml", "xhtml");
          if (in_array($type, $xmlList)) {
              return XmlRenderer::getInstance();
          }
          $sgmlList = array("sgml", "html");
          if (in_array($type, $sgmlList)) {
              return SgmlRenderer::getInstance();
          }
          
          throw new \InvalidArgumentException("Invalid type name: {$type}.");
      }
docs: 指定された引数で Renderer オブジェクトを初期化します.
  
  @see    Renderer::setRenderer()
  @param  Renderer|string $var
  @return Renderer
  @throws \InvalidArgumentException