Prints all objects (class, interface, trait)

@return string
326060
protected function renderObjects()
    {
        static $cluster = 0;

        $clusterString = '';
        $indent        = 1;

        foreach ($this->objects as $ns => $objects) {
            $undeclared     = false;
            $clusterString .= $this->formatLine('subgraph cluster_' . $cluster . ' {', $indent);
            $cluster++;

            $indent++;
            $clusterString .= $this->formatLine('label="' . str_replace('\\', '\\\\', $ns) . '";', $indent);

            foreach ($objects as $shortName => $values) {
                $clusterString .= $this->formatLine($values['pre'], $indent);
                if ($values['undeclared']) {
                    $undeclared = true;
                }
            }

            if ($undeclared) {
                // set background-color of undeclared namespace elements
                $clusterString .= $this->formatLine('bgcolor="#EB937F";', $indent);
            }

            $indent--;
            $clusterString .= $this->formatLine('}', $indent);
        }
        return $clusterString;
    }
1224367
public static final function values() {
			$key = get_called_class();

			if (array_key_exists($key, self::$types))
				return self::$types[$key];

			return array();
		}
725089
public function getTraits()
    {
        if (!isset($this->traits)) {
            $traitAdaptations = [];
            $this->traits     = ReflectionClass::collectTraitsFromClassNode($this->classLikeNode, $traitAdaptations);
            $this->traitAdaptations = $traitAdaptations;
        }

        return $this->traits;
    }
1346517
public function toObject()
    {
        $output = array('cols' => array(), 'rows' => array());

        // Column Definitions
        foreach ($this->columns as $inputColumn) {
            $output['cols'][] = $inputColumn->toDefinitionObject();
        }

        // Rows
        foreach ($this->rows as $inputRow) {
            $row = array('c' => array());
            foreach ($inputRow->getCells() as $i => $cell) {
                if (null === $cell) {
                    $row['c'][] = null;
                } else {
                    $colType = $this->columns[$i]->getType();
                    $outputCell = array('v' => $colType->convertToCellValue($cell));
                    $stringVal = $colType->convertToStringVersion($cell);
                    if ($stringVal != null) {
                        $outputCell['f'] = trim($stringVal);
                    }
                    $row['c'][] = (object) $outputCell;
                }
            }

            $output['rows'][] = (object) $row;
        }

        return (object) $output;
    }
775048
private function getClassBody()
    {

        // sort the class components by their name
        $this->classComponents->sort(
            function( PhpClassComponent $a, PhpClassComponent $b ) {
                if ($a::SORT_ORDERING == $b::SORT_ORDERING) {
                    return $a->name < $b->name ? -1 : 1;
                }
                return ($a::SORT_ORDERING < $b::SORT_ORDERING) ? -1 : 1;
            }
        );

        $output = [];
        $lastType = null;
        $lastNumLines = null;
        foreach( $this->classComponents as $component ) {

            // manage strategy for adding new lines
            $componentAsLines = $component->content->toArray();
            if( !$lastType || !$component instanceof $lastType ) {
                $output[] = "\n";
            } elseif( count($componentAsLines) > 1 or $lastNumLines > 1 ) {
                $output[] = "\n";
            }
            $lastType = get_class( $component );
            $lastNumLines = count( $componentAsLines );

            // build the output;
            $output = array_merge( $output, $componentAsLines );

        }
        $output[] = "\n";
        return new Format( $output );

    }
500007
public function getFilenames()
    {
        $files = [];
        foreach ($this->classList->getClasses() as $class) {
            // Push interfaces before classes if not already loaded
            try {
                $r = new \ReflectionClass($class);
                foreach ($r->getInterfaces() as $inf) {
                    $name = $inf->getFileName();
                    if ($name && !in_array($name, $files)) {
                        $files[] = $name;
                    }
                }
                if (!in_array($r->getFileName(), $files)) {
                    $files[] = $r->getFileName();
                }
            } catch (\ReflectionException $e) {
                // We ignore all exceptions related to reflection because in
                // some cases class doesn't need to exist. We're ignoring all
                // problems with classes, interfaces and traits.
            }
        }

        return $files;
    }
780723
public function printWidgetTree()
    {
        echo get_class($this), ' ', $this->id;

        if (count($this->children) > 0) {
            echo '<ul>';
            foreach ($this->children as $child) {
                echo '<li>';
                $child->printWidgetTree();
                echo '</li>';
            }
            echo '</ul>';
        }
    }
696243
@SuppressWarnings("unused")
    public void printAll()
    {
        project.getLogger().lifecycle("Full contents of dependency configurations:");
        project.getLogger().lifecycle("-------------------------------------------");
        for (final Map.Entry<String, DependencyConfig> entry : depConfigs.entrySet()) {
            project.getLogger().lifecycle("- " + entry.getKey() + ":\t" + entry.getValue());
        }
    }
443416
protected function toStringType()
    {
        $type = 'class ';

        switch (true) {
            case $this->isInterface():
                $type = 'interface ';
                break;
            case $this->isAbstract():
                $type = 'abstract class ';
                break;
            case $this->isFinal():
                $type = 'final class ';
                break;
            case $this->isTrait():
                $type = 'trait ';
        }

        return $type;
    }
422666
public function traits() {
        $traits = $this->reflection()->getTraitNames();
        $parent = get_parent_class($this->_class);

        while ($parent) {
            $traits = array_merge($traits, class_uses($parent));
            $parent = get_parent_class($parent);
        }

        return array_values($traits);
    }
468548
public function toString()
    {
        ob_start();

        printf(
            "%s:\n\nMessage:\n\t%s\n\n" . "In file '%s' on line %s.\n\n",
            $this->getSeverityString(),
            $this->message,
            $this->file,
            $this->line
        );

        echo "Stack Trace:\n";
        $count = count($this->backtrace);

        foreach ($this->backtrace as $entry) {
            $class = array_key_exists('class', $entry) ? $entry['class'] : null;

            $function = array_key_exists('function', $entry)
                ? $entry['function']
                : null;

            if (array_key_exists('args', $entry)) {
                $arguments = $this->getArguments(
                    $entry['args'],
                    $function,
                    $class
                );
            } else {
                $arguments = '';
            }

            printf(
                "%s. In file '%s' on line %s.\n%sMethod: %s%s%s(%s)\n",
                str_pad(--$count, 6, ' ', STR_PAD_LEFT),
                array_key_exists('file', $entry) ? $entry['file'] : 'unknown',
                array_key_exists('line', $entry) ? $entry['line'] : 'unknown',
                str_repeat(' ', 8),
                $class === null ? '' : $class,
                array_key_exists('type', $entry) ? $entry['type'] : '',
                $function === null ? '' : $function,
                $arguments
            );
        }

        echo "\n";

        return ob_get_clean();
    }
110001
public function types()
    {
        if ($this->types === null) {
            $this->types = [];

            $grav = Grav::instance();

            /** @var UniformResourceLocator $locator */
            $locator = $grav['locator'];

            // Get stream / directory iterator.
            if ($locator->isStream($this->search)) {
                $iterator = $locator->getIterator($this->search);
            } else {
                $iterator = new \DirectoryIterator($this->search);
            }

            /** @var \DirectoryIterator $file */
            foreach ($iterator as $file) {
                if (!$file->isFile() || '.' . $file->getExtension() !== YAML_EXT) {
                    continue;
                }
                $name = $file->getBasename(YAML_EXT);
                $this->types[$name] = ucfirst(str_replace('_', ' ', $name));
            }
        }

        return $this->types;
    }
1002243
public static function _printCallback($callback)
    {
        if (is_array($callback)) {
            if (is_object($callback[0])) {
                $className = get_class($callback[0]);
            } else {
                $className = strval($callback[0]);
            }
            $functionName = $className . '::' . strval($callback[1]);
        }
        else {
            $functionName = strval($callback);
        }
        return $functionName;
    }
1199709
public function formatter($object)
    {
        $interfaces = class_implements($object);

        foreach ($interfaces as $interface) {
            $class = $this->getClassName($interface);

            if (isset($this->formatters[$class])) {
                return $this->formatters[$class];
            }
        }

        $class = $this->getClassName(get_class($object));

        return $this->formatters[$class];
    }
567798
def print_all(self, cls, data):
        
        javabridge.call(
            self.jobject, "print", "(Lweka/classifiers/Classifier;Lweka/core/Instances;)V",
            cls.jobject, data.jobject)
286422
public function findMultiple($classes = [], $interfaces = [], $traits = []) {
        $this->init();

        $classes    = $this->normalizeArray($classes);
        $interfaces = $this->normalizeArray($interfaces);
        $traits     = $this->normalizeArray($traits);

        $foundClasses = [];

        if ($classes !== false) {
            foreach ($classes as $class) {
                $foundClasses = array_merge($foundClasses, $this->findExtends($class));
            }
        }

        if ($interfaces !== false) {
            foreach ($interfaces as $interface) {
                $foundClasses = array_merge($foundClasses, $this->findImplements($interface));
            }
        }

        if ($traits !== false) {
            foreach ($traits as $trait) {
                $foundClasses = array_merge($foundClasses, $this->findTraitUse($trait));
            }
        }

        return $this->arrayUniqueObject($foundClasses);
    }
173357
protected function printObject($value, $level = 0)
    {
        $reflector = new ReflectionClass($value);

        // Display the general information about given object.
        $result = $this->getGeneralObjectInfo($value) . PHP_EOL;

        if ( ! $this->config["object_limited_info"]) {
            // Display all parent classes.
            if (count($parents = $this->getAllParentClassNames($reflector)) > 0) {
                $result .= sprintf("Classes: %s" . PHP_EOL, implode(", ", $parents));
            }

            // Display all interfaces (interface inheritance is supported).
            if (count($interfaces = $reflector->getInterfaceNames()) > 0) {
                $result .= sprintf("Interfaces: %s" . PHP_EOL, implode(", ", $interfaces));
            }

            // Display all class traits.
            if (count($traits = $this->getAllTraitNames($reflector)) > 0) {
                $result .= sprintf("Traits: %s" . PHP_EOL, implode(", ", $traits));
            }
        }

        // Display property values.
        if ($info = $this->getPropertyValues($reflector, $value, $level + 1)) {
            $result .=
                str_repeat($this->config["array_indenting"], $level)
                . "Properties:" . PHP_EOL . $info;
        }

        return $result;
    }