gets the class

@param string $string string

@return string something
493898
function _getClass($string)
	{
		if (preg_match('/class=("([^"]*)"|\'([^\']*)\'|[^>\s]*)([^>]*)?>/is', $string, $match)) {
			$val_match = trim($match[1]);
			$val_match = trim($val_match, '"\'');
			unset($string);
			return $val_match;
		}
		return false;
	}
489102
public function read($string)
    {
        try {
            $wasUsingErrors = libxml_use_internal_errors();
            @$xmlObject = simplexml_load_string($string);
            libxml_use_internal_errors($wasUsingErrors);
            if ($xmlObject) {
                return $this->recurseToArray($xmlObject);
            }
        } catch (\Exception $e) {
            // Do nothing
        }
        return null;
    }
554627
public function make($string)
    {
        $options = array();
        foreach (explode(',', $string) as $pair) {
            $parts = explode(':', $pair, 2);
            if (count($parts) === 2) {
                list($key, $value) = $parts;
                $options[$key] = $value;
            }
        }
        $class = get_class($this);
        return new $class($options);
    }
723841
public static function toClass($string)
    {
        if (empty($string)) {
            return null;
        }

        $classnameMatches = [];
        if (preg_match('/^([a-zA-Z_]{1}[a-zA-Z0-9_\\\\]*)\.class/', $string, $classnameMatches) != false) {
            return new \ReflectionClass($classnameMatches[1]);
        }

        return null;
    }
171033
public static function low($string): string
    {
        $cleaned = Str::low($string);
        $cleaned = Str::trim($cleaned);

        return $cleaned;
    }
966845
public static function stringToValue($string)
	{
		if($string == '')
		{
			return $string;
		}
		if(is_float($string))
		{
			return (float) $string;
		}
		if(is_int($string))
		{
			return (int) $string;
		}
		if(strtolower($string) == 'true')
		{
			return true;
		}
		if(strtolower($string) == 'false')
		{
			return false;
		}
		if(strtolower($string) == 'null')
		{
			return NULL;
		}
		
		return $string;
	}
937900
protected function doUnclassify($string)
    {
        $string = str_replace('\\', '_', $string);
        $parts = explode("_", $string);
        $parts = array_map([$this, "underscore"], $parts);

        return implode("-", $parts);
    }
691213
public static function low($string): string
    {
        if (self::isMBString()) {
            return mb_strtolower($string, self::$encoding);
        }

        return strtolower($string); // @codeCoverageIgnore
    }
658898
protected function getComparatorFromString($string)
    {
        foreach (self::$comparators as $comparator) {
            if (strpos($string, $comparator) !== false) {
                return $comparator;
            }
        }

        return null;
    }
927949
public static function ucFirst($string)
    {
        $ucFirst = static::sub($string, 0, 1);
        $ucFirst = static::upp($ucFirst);

        return $ucFirst . static::sub($string, 1);
    }
595074
private function getAnyType($string)
    {
        $anyString = '';

        do {
            $anyString .= $string[0];
            $string = substr($string, 1);

            $typeInfo = $this->scanNextType($string);

            // ignore all until markup reached
            if ($typeInfo['type'] !== self::T_MARKUP_OPEN && $typeInfo['type'] !== self::T_MARKUP_OPEN_ESCAPED) {
                $typeInfo = null;
            }
        } while ($typeInfo === null && $string);

        return [
            'type'   => self::T_ANY,
            'match'  => $anyString,
            'length' => strlen($anyString),
        ];
    }
444143
public static function fromString($string)
	{
		$lowercaseString = trim(strtolower($string), "\\");

		// TODO: variant types

		if ($lowercaseString === "mixed") {
			return MixedType::getInstance();

		} elseif ($lowercaseString === "scalar") {
			return ScalarType::getInstance();

		} elseif ($lowercaseString === "object") {
			return ObjectType::getInstance();

		} elseif ($lowercaseString === "void" || $lowercaseString === "null") {
			return VoidType::getInstance();

		} elseif ($lowercaseString === "numeric" || $lowercaseString === "number") {
			return NumericType::getInstance();

		} elseif ($lowercaseString === "int" || $lowercaseString === "integer") {
			return IntType::getInstance();

		} elseif ($lowercaseString === "float" || $lowercaseString === "double") {
			return FloatType::getInstance();

		} elseif ($lowercaseString === "bool" || $lowercaseString === "boolean") {
			return BoolType::getInstance();

		} elseif ($lowercaseString === "string") {
			return StringType::getInstance();

		} elseif ($lowercaseString === "resource" || $lowercaseString === "stream") {
			return ResourceType::getInstance();

		} elseif ($lowercaseString === "callable" || $lowercaseString === "callback" || trim($lowercaseString, "\\") === "closure") {
			return CallableType::getInstance();

		} elseif (strncmp($lowercaseString, "array", 5 /* strlen("array") */) === 0) {
			return ArrayType::create(MixedType::getInstance());

		} else {
			if (func_num_args() > 1) {
				$stack = func_get_arg(1);
			} else {
				$stack = new \ArrayObject();
			}

			if (func_num_args() > 2) {
				$reader = func_get_arg(2);
			} else {
				$reader = new AnnotationReader();
			}

			if (func_num_args() > 3) {
				$phpParser = func_get_arg(3);
			} else {
				$phpParser = new PhpParser();
			}

			if (func_num_args() > 4 && func_get_arg(4) !== null) {
				/** @var Type $declaringType */
				$declaringType = func_get_arg(4);
				$useStatements = $declaringType->getUseStatements();
			} else {
				$declaringType = null;
				$useStatements = array();
			}

			if ($lowercaseString === "\$this" || $lowercaseString === "self" || $lowercaseString === "static") {
				if ($declaringType === null) {
					throw new \InvalidArgumentException("Type string references declaring class, but no declaring class given.");
				}

				return $declaringType;

			} elseif (substr($string, -2) === "[]") {
				$baseString = substr($string, 0, strlen($string) - 2);
				return ArrayType::create(MixedType::fromString($baseString, $stack, $reader, $phpParser, $declaringType));

			} else {
				if ($string[0] === "\\") {
					$typeName = trim($string, "\\");

				} elseif (isset($useStatements[$lowercaseString])) {
					$typeName = $useStatements[$lowercaseString];
					// TODO: `use` with namespace (e.g. `use Doctrine\Mapping as ORM;`)

				} elseif ($declaringType !== null) {
					$typeName = $declaringType->getNamespaceName() . "\\" . $string;

				} else {
					$typeName = $string;
				}

				return Type::fromReflection(new \ReflectionClass($typeName), $stack, $reader, $phpParser);
			}
		}
	}
761612
public static function fromString(string $string): self
    {
        $string = new Str($string);
        $pattern = sprintf(
            '~%s/[\w\-.]+(\+\w+)?([;,] [\w\-.]+=[\w\-.]+)?~',
            self::topLevels()->join('|')
        );

        if (!$string->matches($pattern)) {
            throw new InvalidMediaTypeString;
        }

        $splits = $string->pregSplit('~[;,] ?~');
        $matches = $splits
            ->get(0)
            ->capture(sprintf(
                '~^(?<topLevel>%s)/(?<subType>[\w\-.]+)(\+(?<suffix>\w+))?$~',
                self::topLevels()->join('|')
            ));

        $topLevel = $matches->get('topLevel');
        $subType = $matches->get('subType');
        $suffix = $matches->contains('suffix') ? $matches->get('suffix') : '';
        $params = new Map('string', Parameter::class);

        $splits
            ->drop(1)
            ->foreach(function(Str $param) use (&$params) {
                $matches = $param->capture(
                    '~^(?<key>[\w\-.]+)=(?<value>[\w\-.]+)$~'
                );

                $params = $params->put(
                    (string) $matches->get('key'),
                    new Parameter\Parameter(
                        (string) $matches->get('key'),
                        (string) $matches->get('value')
                    )
                );
            });

        return new self(
            (string) $topLevel,
            (string) $subType,
            (string) $suffix,
            $params
        );
    }
1362804
public function getString($String)
    {
        if (isset($this->Data[$String])) {
            return $this->Data[$String];
        }
        return isset($this->Fallback[$String]) ? $this->Fallback[$String] : '';
    }
1180609
public static function className($string) {
        return static::cache(array(__METHOD__, $string), function() use ($string) {
            return Inflector::camelCase(Inflector::singularize($string));
        });
    }
886254
private function getClass($mixed = null)
        {
            if (is_object($mixed)) {
                return get_class($mixed);
            }

            if (!is_null($mixed)) {
                return $mixed;
            }

            return $this->getCalledClass();
        }
637686
public function toObject($string): stdClass
    {
        if (is_string($string)) {
            return $this->jsonDecode($string);
        }

        return $this->jsonDecode($this->jsonEncode($string));
    }