original_string: public function addElement($element, $type, $contents, $attr_includes = array(), $attr = array())
      {
          $this->elements[] = $element;
          // parse content_model
          list($content_model_type, $content_model) = $this->parseContents($contents);
          // merge in attribute inclusions
          $this->mergeInAttrIncludes($attr, $attr_includes);
          // add element to content sets
          if ($type) {
              $this->addElementToContentSet($element, $type);
          }
          // create element
          $this->info[$element] = HTMLPurifier_ElementDef::create(
              $content_model,
              $content_model_type,
              $attr
          );
          // literal object $contents means direct child manipulation
          if (!is_string($contents)) {
              $this->info[$element]->child = $contents;
          }
          return $this->info[$element];
      }
code: public function addElement($element, $type, $contents, $attr_includes = array(), $attr = array())
      {
          $this->elements[] = $element;
          // parse content_model
          list($content_model_type, $content_model) = $this->parseContents($contents);
          // merge in attribute inclusions
          $this->mergeInAttrIncludes($attr, $attr_includes);
          // add element to content sets
          if ($type) {
              $this->addElementToContentSet($element, $type);
          }
          // create element
          $this->info[$element] = HTMLPurifier_ElementDef::create(
              $content_model,
              $content_model_type,
              $attr
          );
          // literal object $contents means direct child manipulation
          if (!is_string($contents)) {
              $this->info[$element]->child = $contents;
          }
          return $this->info[$element];
      }
code_tokens: public function addElement ( $ element , $ type , $ contents , $ attr_includes = array ( ) , $ attr = array ( ) ) { $ this -> elements [ ] = $ element ; // parse content_model list ( $ content_model_type , $ content_model ) = $ this -> parseContents ( $ contents ) ; // merge in attribute inclusions $ this -> mergeInAttrIncludes ( $ attr , $ attr_includes ) ; // add element to content sets if ( $ type ) { $ this -> addElementToContentSet ( $ element , $ type ) ; } // create element $ this -> info [ $ element ] = HTMLPurifier_ElementDef :: create ( $ content_model , $ content_model_type , $ attr ) ; // literal object $contents means direct child manipulation if ( ! is_string ( $ contents ) ) { $ this -> info [ $ element ] -> child = $ contents ; } return $ this -> info [ $ element ] ; }
docstring: Convenience function that sets up a new element
  @param string $element Name of element to add
  @param string|bool $type What content set should element be registered to?
  Set as false to skip this step.
  @param string $contents Allowed children in form of:
  "$content_model_type: $content_model"
  @param array $attr_includes What attribute collections to register to
  element?
  @param array $attr What unique attributes does the element define?
  @see HTMLPurifier_ElementDef:: for in-depth descriptions of these parameters.
  @return HTMLPurifier_ElementDef Created element definition object, so you
  can set advanced parameters
docstring_tokens: Convenience function that sets up a new element