Returns the methods of the class and the methods of all parents

@param bitmap $types see self::WITH_*
763929
public function getAllMethods($types = self::FULL_HIERARCHY) {
    if ($types & self::WITH_OWN) {
      $methods = clone $this->methods;
    } else {
      $methods = new GObjectCollection(array());
    }
    
    if ($types & self::WITH_PARENTS && $this->getParent() != NULL) {
      // treat duplicates (aka: overriden methods):
      $parentTypes = $types | self::WITH_OWN;
      foreach ($this->getParent()->getAllMethods($parentTypes) as $method) {
        if (!$methods->has($method)) {
          $methods->add($method);
        }
      }
    }

    $interfaceTypes = 0x000000;
    if ($types & self::WITH_INTERFACE) $interfaceTypes |= self::WITH_OWN;
    if ($types & self::WITH_PARENTS_INTERFACES) $interfaceTypes |= self::WITH_PARENTS;
    
    foreach ($this->getAllInterfaces($interfaceTypes) as $interface) {
      //$interface->elevateClass();
      // return only own interface methods, because we already have all interfaces from wohle hierarchy
      // or without parents, if we dont like to have the parents interfaces
      foreach ($interface->getMethods() as $method) { 
        if (!$methods->has($method)) {
          $methods->add($method);
        }
      }
    }
    
    return $methods->toArray();
  }
1257531
private static function getTyped($type)
    {
        if (!isset(static::$types[$type])) {
            static::$types[$type] = new self($type);
        }

        return static::$types[$type];
    }
1228088
public function getMethods( $withMagics = TRUE )
	{
		if( $withMagics )
			return $this->methods;
		else
		{
			$methods	= array();
			foreach( $this->methods as $method )
				if( substr( $method->getName(), 0, 2 ) !== "__" )
					$methods[$method->getName()]	= $method;
			return $methods;
		}
	}
531658
public function flat(array $types = []) {
        if (in_array(get_class($this), $types))
            return [$this];
        $flat = [];
        foreach ($this->children as $c) {
            $flat = array_merge($flat, $c->flat($types));
        }
        return $flat;
    }
604442
public function all($type = null)
    {
        return array_filter(
            $this->bag,
            /** @var BuilderInterface $builder */
            function (BuilderInterface $builder) use ($type) {
                return $type === null || $builder->getType() == $type;
            }
        );
    }
549371
public function listActions() {
		$parentClassMethods = get_class_methods(get_parent_class($this->Controller));
		$subClassMethods = get_class_methods($this->Controller);
		$classMethods = array_diff($subClassMethods, $parentClassMethods);
		foreach ($classMethods as $key => $classMethod) {
			if (mb_substr($classMethod, 0, 1) === '_') {
				unset($classMethods[$key]);
			}
		}
		return $classMethods;
	}
315314
public function stack($types = [])
    {
        if (is_string($types)) {
            $types = explode(',', $types) ?: [];
            $types = array_filter(array_map('trim', $types));
        }

        $files = $this->stack->getList($types);

        return $files;
    }
156752
public static function getClass($type)
    {
        if (!static::isAvailable($type)) {
            throw new \Exception(
                "Invalid image format '{$type}'. " .
                "Allowed formats are: " . implode(', ', static::available())
            );
        }

        $className = static::$typesMap[strtolower($type)];

        return new $className();
    }
154041
private function classGetter($className, $types)
    {
        if (!class_exists($className)) {
            return;
        }

        $obj = $this->get($className);

        foreach ($types as $type) {
            if ($obj instanceof $type) {
                return $obj;
            }
        }
    }
96520
public function getImages($type = null)
    {
        if ($type) {
            if (! isset($this->imagesOfType[$type])) {
                if (count($this->images)) {
                    $this->imagesOfType[$type] = $this->images->where('image_type', $type);
                } else {
                    $this->imagesOfType[$type] = collect([]);
                }
            }

            return $this->imagesOfType[$type];
        }

        return $this->images;
    }
290438
private function mapType($type)
    {
        $types = [
            Gmagick::IMGTYPE_BILEVEL              => 'BILEVEL',
            Gmagick::IMGTYPE_GRAYSCALE            => 'GRAYSCALE',
            Gmagick::IMGTYPE_GRAYSCALEMATTE       => 'GRAYSCALEMATTE',
            Gmagick::IMGTYPE_PALETTE              => 'PALETTE',
            Gmagick::IMGTYPE_PALETTEMATTE         => 'PALETTEMATTE',
            Gmagick::IMGTYPE_TRUECOLOR            => 'TRUECOLOR',
            Gmagick::IMGTYPE_TRUECOLORMATTE       => 'TRUECOLORMATTE',
            Gmagick::IMGTYPE_COLORSEPARATION      => 'COLORSEPARATION',
            Gmagick::IMGTYPE_COLORSEPARATIONMATTE => 'COLORSEPARATIONMATTE',
            Gmagick::IMGTYPE_OPTIMIZE             => 'OPTIMIZE',
            Gmagick::IMGTYPE_UNDEFINED            => 'UNDEFINED',
        ];

        if (!isset($types[$type])) {
            return $types[Gmagick::IMGTYPE_UNDEFINED];
        }

        return $types[$type];
    }
969741
protected function getAdminExtensionReferenceByTypes(array $types)
    {
        $references = [];
        foreach ($types as $type) {
            $references[$type] = new Reference('sonata_translation.admin.extension.'.$type.'_translatable');
        }

        return $references;
    }
139027
public function get_unknown_file_types($types) {
        $unknown = [];

        foreach ($this->normalize_file_types($types) as $type) {
            if ($type === '*') {
                // Any file is considered as a known type.
                continue;
            } else if ($type === '.xxx') {
                $unknown[$type] = true;
            } else if ($this->is_filetype_group($type)) {
                // The type is a group that exists.
                continue;
            } else if ($this->looks_like_mimetype($type)) {
                // If there's no extension associated with that mimetype, we consider it unknown.
                if (empty(file_get_typegroup('extension', [$type]))) {
                    $unknown[$type] = true;
                }
            } else {
                $coretypes = core_filetypes::get_types();
                $typecleaned = str_replace(".", "", $type);
                if (empty($coretypes[$typecleaned])) {
                    // If there's no extension, it doesn't exist.
                    $unknown[$type] = true;
                }
            }
        }

        return array_keys($unknown);
    }
1296793
private function getParents($name) {
        if (!isset($this->_parents[$name])) {
            $class = new \ReflectionClass($name);
            $parents = array($name);
            $interfaces = $class->getInterfaceNames();
            while ($class = $class->getParentClass())
                $parents[] = $class->getName();
            $this->_parents[$name] = array_reverse($parents);
            foreach ($interfaces as $int) {
                $this->_parents[$name][] = $int;
            }
        }
        return $this->_parents[$name];
    }
1170931
protected function getParentClasses($name)
    {
        // Collect parent classes, ignoring transient (not-mapped) classes.
        $parentClasses = array();
        foreach (array_reverse(class_parents($name)) as $parentClass) {
            if (!$this->driver->isTransient($parentClass)) {
                $parentClasses[] = $parentClass;
            }
        }
        return $parentClasses;
    }
609716
public static function listMethods($class, $type = \ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_STATIC)
    {
        $methods = ReflectionHelper::getMethods($class, $type);

        $lines = [];

        /** @var \ReflectionMethod $method */
        foreach ($methods as $method) {
            preg_match('/\s+\*\s+@return\s+([\w]+)\s*[\w ]*/', $method->getDocComment(), $matches);

            $return = isset($matches[1]) ? $matches[1] : 'void';

            if ($return == 'static' || $return == 'self' || $return == '$this') {
                $return = $method->getDeclaringClass()->getName();
            }

            if (class_exists($return)) {
                $return = '\\' . $return;
            }

            $source = file($method->getFileName());
            $body   = implode("", array_slice($source, $method->getStartLine() - 1, 1));

            preg_match('/\s+public\s+[static]*\s*function\s+(.*)/', $body, $matches);
            $body = $matches[1];

            $lines[] = sprintf(' * @method  %s  %s', $return, $body);
        }

        return static::renderDocblock(implode("\n", $lines));
    }
1131141
public function getMethods($type)
    {
        $result = [];
        if ($type !== false) {
            $typeNorm = $this->toolsType->normalizeType($type);
            /** @var \Zend\Code\Reflection\ClassReflection $reflection */
            $reflection = new \Zend\Code\Reflection\ClassReflection($typeNorm);
            /** @var \Zend\Code\Reflection\DocBlockReflection $docBlock */
            $docBlock = $reflection->getDocBlock();
            $annotatedMethods = $this->_processClassDocBlock($docBlock);
            /* process normal methods (not annotated) */
            $publicMethods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
            $generalMethods = $this->_processClassMethods($publicMethods);
            $merged = array_merge($generalMethods, $annotatedMethods);
            /* convert results to array form according Magento requirements to be saved in the cache */
            /** @var \Praxigento\Core\App\Reflection\Data\Method $item */
            foreach ($merged as $item) {
                $methodName = $item->getName();
                $entry = [
                    'type' => $item->getType(),
                    'isRequired' => $item->getIsRequired(),
                    'description' => $item->getDescription(),
                    'parameterCount' => $item->getParameterCount()
                ];
                $result[$methodName] = $entry;
            }
        }
        return $result;
    }