original_string: public function generateChildDef(&$def, $module)
      {
          if (!empty($def->child)) { // already done!
              return;
          }
          $content_model = $def->content_model;
          if (is_string($content_model)) {
              // Assume that $this->keys is alphanumeric
              $def->content_model = preg_replace_callback(
                  '/\b(' . implode('|', $this->keys) . ')\b/',
                  array($this, 'generateChildDefCallback'),
                  $content_model
              );
              //$def->content_model = str_replace(
              //    $this->keys, $this->values, $content_model);
          }
          $def->child = $this->getChildDef($def, $module);
      }
code: public function generateChildDef(&$def, $module)
      {
          if (!empty($def->child)) { // already done!
              return;
          }
          $content_model = $def->content_model;
          if (is_string($content_model)) {
              // Assume that $this->keys is alphanumeric
              $def->content_model = preg_replace_callback(
                  '/\b(' . implode('|', $this->keys) . ')\b/',
                  array($this, 'generateChildDefCallback'),
                  $content_model
              );
              //$def->content_model = str_replace(
              //    $this->keys, $this->values, $content_model);
          }
          $def->child = $this->getChildDef($def, $module);
      }
code_tokens: public function generateChildDef ( & $ def , $ module ) { if ( ! empty ( $ def -> child ) ) { // already done! return ; } $ content_model = $ def -> content_model ; if ( is_string ( $ content_model ) ) { // Assume that $this->keys is alphanumeric $ def -> content_model = preg_replace_callback ( '/\b(' . implode ( '|' , $ this -> keys ) . ')\b/' , array ( $ this , 'generateChildDefCallback' ) , $ content_model ) ; //$def->content_model = str_replace( //    $this->keys, $this->values, $content_model); } $ def -> child = $ this -> getChildDef ( $ def , $ module ) ; }
docstring: Accepts a definition; generates and assigns a ChildDef for it
  @param HTMLPurifier_ElementDef $def HTMLPurifier_ElementDef reference
  @param HTMLPurifier_HTMLModule $module Module that defined the ElementDef
docstring_tokens: Accepts a definition ; generates and assigns a ChildDef for it