Render Class with methods.

@param string $eol
@param string $padding
@param callable|null $methodFilter

@return string
189451
public function render($eol = "\n", $padding = '    ', $methodFilter = null)
    {
        $rendered = '';
        $comment = $this->comment;
        if ($comment !== false) {
            $comment = trim($comment);
            if ($comment !== '') {
                $rendered .= str_replace($eol . '*', $eol . ' *', implode($eol, array_map('trim', explode("\n", $comment)))) . $eol;
            }
        }
        if ($this->reflectionClass->isAbstract()) {
            $rendered .= 'abstract ';
        }
        $rendered .= 'class ' . $this->aliasBasename . ' extends \\' . $this->fqn . "{$eol}{{$eol}";
        $firstMethod = true;
        foreach ($this->methods as $method) {
            if (is_callable($methodFilter) && (call_user_func($methodFilter, $this, $method) === false)) {
                continue;
            }
            if ($firstMethod) {
                $firstMethod = false;
                if ($this->isFacade()) {
                    $rendered .= $padding . '/**' . $eol . $padding . ' * @var ' . $this->fqn . $eol . $padding . ' */' . $eol;
                    $rendered .= $padding . 'protected static $instance;' . $eol;
                }
            }
            $rendered_method = $method->render($eol, $padding);
            if ($rendered_method !== '') {
                $rendered .= $padding . rtrim(str_replace($eol, $eol . $padding, $rendered_method)) . $eol;
            }
        }
        $rendered .= "}{$eol}";

        return $rendered;
    }
976876
def filter(node, indent)
      # Evaluate and generate node attributes, then process each one to
      # by generating the required attribute code
      attributes = {}
      node[@options].each do |key, attribute|
        attributes[key] = map_attribute key, attribute
      end

      # Get registered filter name
      name = node[@value]

      # Check if filter is registered
      self.error :filter_registered, name unless Filters.filters.has_key? name

      # Load the required filter
      Filters.filters[name].load_filter

      # Render output using the chosen engine
      output = Filters.filters[name].render node[@children]

      # Main output node which contains filter rendered value
      text_node = [:plain, :text, {value: output.rstrip, escaped: false, evaluate: false}, [], nil]

      # If we have a provided filter tag, wrap the text node in the wrapper
      # node tag and further indent
      if (wrapper_tag = Filters.filters[name].options[:tag])
        # Set wrapper tag attributes as evaluable expressions
        atts = {}
        Filters.filters[name].options[:attributes].each do |key, value|
          atts[key] = [:expression, value.inspect, {evaluate: false, escaped: false}]
        end

        # Create the wrapper node containing the output text node as a child
        wrapper_node = [:node, wrapper_tag, {attributes: atts}, [text_node], indent]

        # Begin code generation from the wrapper node
        root wrapper_node, indent
      else
        # Generate code for output text node
        root text_node, indent
      end
    end
898636
protected static final StringBuilder renderPad(final StringBuilder builder,
            final int pad, final boolean newLine) {
        renderNewLine(builder, newLine);
        for (int i = 0; i < pad; i++) {
            builder.append(' ');
        }
        return builder;
    }
70556
private function classMethodCall($class_name, $colon_node, $method_name) {
    $node = new ClassMethodCallNode();
    $node->addChild($class_name, 'className');
    $node->mergeNode($colon_node);
    $node->addChild($method_name, 'methodName');
    $this->functionCallParameterList($node);
    return $this->objectDereference($this->arrayDeference($node));
  }
1124477
public function getMethodAnnotations($className, $methodName, $annotationClassName = null)
    {
        if (!$this->initialized) {
            $this->initialize();
        }
        $className = $this->cleanClassName($className);
        $annotationClassName = $annotationClassName === null ? null : $this->cleanClassName($annotationClassName);

        $annotations = [];
        $methodAnnotations = $this->annotationReader->getMethodAnnotations(new MethodReflection($className, $methodName));
        if ($annotationClassName === null) {
            return $methodAnnotations;
        }

        foreach ($methodAnnotations as $annotation) {
            if ($annotation instanceof $annotationClassName) {
                $annotations[] = $annotation;
            }
        }

        return $annotations;
    }
386972
private function getMethodName($contextClass, $canonicalText, $pattern)
    {
        $methodName = $this->deduceMethodName($canonicalText);
        $methodName = $this->getUniqueMethodName($contextClass, $pattern, $methodName);

        return $methodName;
    }
947090
public static function render($filter = '')
    {
        $returnValue = (string) '';

        
		if(empty($filter) || strtolower($filter) == tao_helpers_Scriptloader::CSS){
			foreach(self::$cssFiles as $file){
				$returnValue .= "\t<link rel='stylesheet' type='text/css' href='{$file}' />\n";
			}
		}
		if(empty($filter) || strtolower($filter) == tao_helpers_Scriptloader::JS){
			if(count(self::$jsVars) > 0){
				$returnValue .= "\t<script type='text/javascript'>\n";
				foreach(self::$jsVars as $name => $value){
					$returnValue .= "\tvar {$name} = '{$value}';\n";
				}
				$returnValue .= "\t</script>\n";
			}
			foreach(self::$jsFiles as $file){
				$returnValue .= "\t<script type='text/javascript' src='{$file}' ></script>\n";
			}
		}
        

        return (string) $returnValue;
    }
1037827
private function getSnippetTemplate($pattern, $methodName, array $methodArguments)
    {
        return sprintf(
            self::$templateTemplate,
            str_replace('%', '%%', $pattern),
            $methodName,
            implode(', ', $methodArguments)
        );
    }
473407
private function generate($level, $eol)
    {
        $handler = new RenderHandler($level, $eol);
        if ($level == 2) {
            $this->root->userAgent->render($handler);
        }
        $this->root->host->render($handler);
        $this->root->cleanParam->render($handler);
        $this->root->sitemap->render($handler);
        if ($level != 2) {
            $this->root->userAgent->render($handler);
        }
        return $handler->generate();
    }
12960
function render(issues, enableFiltering) {
		var content = '';

		if (enableFiltering) {
			content += '<div class="filters">' + getSeverityFilters(issues) + '<div>\n';
		}

		content += '<div>' + getIssues(issues) + '</div>';

		return '<div>' + content + '</div>';
	}
515778
public function methods($filter = null)
    {
        if (is_null($filter))
        {
            $methods = $this->object->getMethods();
        }
        else
        {
            $methods = $this->object->getMethods($filter);
        }

        return array_map([$this, 'extractComment'], $methods);
    }
1002519
public static Result ok(String padding, JsonNode node) {
        return status(Result.OK).render(padding, node);
    }
727696
public function getHelpText($padding = 25)
    {
        $helpText = sprintf($this->getBanner(), $this->scriptName);
        $helpText .= "Options:\n";
        foreach ($this->optionList as $option) {
            $mode = '';
            switch ($option->mode()) {
                case self::NO_ARGUMENT:
                    $mode = '';
                    break;
                case self::REQUIRED_ARGUMENT:
                    $mode = "<".$option->getArgument()->getName().">";
                    break;
                case self::OPTIONAL_ARGUMENT:
                    $mode = "[<".$option->getArgument()->getName().">]";
                    break;
            }
            $short = ($option->short()) ? '-'.$option->short() : '';
            $long = ($option->long()) ? '--'.$option->long() : '';
            if ($short && $long) {
                $options = $short.', '.$long;
            } else {
                $options = $short ? : $long;
            }
            $padded = str_pad(sprintf("  %s %s", $options, $mode), $padding);
            $helpText .= sprintf("%s %s\n", $padded, $option->getDescription());
        }
        return $helpText;
    }
880065
protected function classFilter()
    {
        $className = "";

        if (!$this->match("/^\./")) {
            return false;
        }
        if (!list($className) = $this->is("identifier")) {
            throw new TextParserException("Invalid identifier", $this);
        }
        return new CssParserFilterClass($className);
    }
476518
public static String formatter(Mode mode, Padding padding) {
        return String.format("%s/%s", mode, padding);
    }
954999
public function fileLines($filepath, $line_num, $highlight = true, $padding = 5)
	{
		// deal with eval'd code
		if (strpos($filepath, 'eval()\'d code') !== false)
		{
			return '';
		}

		// We cache the entire file to reduce disk IO for multiple errors
		if ( ! isset($this->filesCache[$filepath]))
		{
			$this->filesCache[$filepath] = file($filepath, FILE_IGNORE_NEW_LINES);
			array_unshift($this->filesCache[$filepath], '');
		}

		$start = max(0, $line_num - $padding);
		$length = ($line_num - $start) + $padding + 1;

		if (($start + $length) > count($this->filesCache[$filepath]) - 1)
		{
			$length = null;
		}

		$debug_lines = array_slice($this->filesCache[$filepath], $start, $length, true);

		if ($highlight)
		{
			$to_replace = array('<code>', '</code>', '<span style="color: #0000BB">&lt;?php&nbsp;', PHP_EOL);
			$replace_with = array('', '', '<span style="color: #0000BB">', '');

			foreach ($debug_lines as &$line)
			{
				$line = str_replace($to_replace, $replace_with, highlight_string('<?php ' . $line, true));
			}
		}

		return $debug_lines;
	}
93680
private static function generateRdataOutput(RdataInterface $rdata, int $padding): string
    {
        if ($rdata instanceof SOA) {
            return self::outputSoa($rdata, $padding);
        }

        if ($rdata instanceof APL) {
            return self::outputApl($rdata, $padding);
        }

        if ($rdata instanceof LOC) {
            return self::outputLoc($rdata, $padding);
        }

        return $rdata->output();
    }