original_string: public static function createElement($type, $name = null, $attributes = null,
                                           array $data = array())
      {
          $type = strtolower($type);
          if (!isset(self::$elementTypes[$type])) {
              throw new HTML_QuickForm2_InvalidArgumentException("Element type '$type' is not known");
          }
          list($className, $includeFile) = self::$elementTypes[$type];
          if (!class_exists($className)) {
              HTML_QuickForm2_Loader::loadClass($className, $includeFile);
          }
          return new $className($name, $attributes, $data);
      }
code: public static function createElement($type, $name = null, $attributes = null,
                                           array $data = array())
      {
          $type = strtolower($type);
          if (!isset(self::$elementTypes[$type])) {
              throw new HTML_QuickForm2_InvalidArgumentException("Element type '$type' is not known");
          }
          list($className, $includeFile) = self::$elementTypes[$type];
          if (!class_exists($className)) {
              HTML_QuickForm2_Loader::loadClass($className, $includeFile);
          }
          return new $className($name, $attributes, $data);
      }
code_tokens: public static function createElement ( $ type , $ name = null , $ attributes = null , array $ data = array ( ) ) { $ type = strtolower ( $ type ) ; if ( ! isset ( self :: $ elementTypes [ $ type ] ) ) { throw new HTML_QuickForm2_InvalidArgumentException ( "Element type '$type' is not known" ) ; } list ( $ className , $ includeFile ) = self :: $ elementTypes [ $ type ] ; if ( ! class_exists ( $ className ) ) { HTML_QuickForm2_Loader :: loadClass ( $ className , $ includeFile ) ; } return new $ className ( $ name , $ attributes , $ data ) ; }
docstring: Creates a new element object of the given type
  
  @param    string  Type name (treated case-insensitively)
  @param    mixed   Element name (passed to element's constructor)
  @param    mixed   Element attributes (passed to element's constructor)
  @param    array   Element-specific data (passed to element's constructor)
  @return   HTML_QuickForm2_Node     A created element
  @throws   HTML_QuickForm2_InvalidArgumentException If type name is unknown
  @throws   HTML_QuickForm2_NotFoundException If class for the element can
  not be found and/or loaded from file
docstring_tokens: Creates a new element object of the given type