Returns complete namespace of classcontent with provided $type.

@param string $type

@return string classname associated to provided

@throws InvalidContentTypeException Raises if $type is unknown
339674
public static function getClassnameByContentType($type)
    {
        try {
            return self::getFullClassname(str_replace('/', NAMESPACE_SEPARATOR, $type));
        } catch (\InvalidArgumentException $e) {
            throw new InvalidContentTypeException($type);
        }
    }
1094365
public function get($type)
    {
        if ($type === self::TYPE_MAILER) {
            $name = $this->configService->getValue('system_mailer');
        } elseif ($type === self::TYPE_DISPATCHER) {
            $name = $this->configService->getValue('system_dispatcher');
        } else {
            throw new \InvalidArgumentException('Provided type does not exist');
        }

        if (empty($name)) {
            return null;
        }

        return $this->connector->getConnection($name);
    }
382494
private static function validateMiddlewareType(string $type) : string
  {
    if (!in_array($type, self::MIDDLEWARE_TYPES)) {
      throw new \InvalidArgumentException(sprintf(
        'Provided middleware type does not exist. Use one of %s instead.',
        implode(', ', self::MIDDLEWARE_TYPES)
      ));
    }

    return $type;
  }
166547
public function listContents($type)
    {
        $names = [];
        $files = $this->listFiles($type);

        foreach ($files as $file) {
            $names[] = static::getName($file);
        }

        return $names;
    }
990259
public function factory($type)
    {
        if (!is_string($type)) {
            throw new \InvalidArgumentException('Invalid confirmation attributes value in confirmation factory');
        }
        if (!array_key_exists($type, $this->typeClassMap)) {
            throw new \InvalidArgumentException('Invalid confirmation attributes value type "'.$type.'"');
        }
        $className = __NAMESPACE__.'\\'.$this->typeClassMap[$type];

        return new $className();
    }
1123474
protected function getRepositoryByType($type)
    {
        if (BlockInterface::ENTITY_TYPE === $type) {
            return $this->blockRepository;
        }
        if (ContentInterface::ENTITY_TYPE === $type) {
            return $this->contentRepository;
        }
        throw new \InvalidArgumentException($type . "ins't supported");
    }
141237
public function getFieldType($type)
    {
        $types = array_keys(static::$availableFieldTypes);

        if (!$type || trim($type) == '') {
            throw new \InvalidArgumentException('Field type must be provided.');
        }

        if (array_key_exists($type, $this->customTypes)) {
            return $this->customTypes[$type];
        }

        if (!in_array($type, $types)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Unsupported field type [%s]. Available types are: %s',
                    $type,
                    join(', ', array_merge($types, array_keys($this->customTypes)))
                )
            );
        }

        $namespace = __NAMESPACE__.'\\Fields\\';

        return $namespace . static::$availableFieldTypes[$type];
    }
669864
public static function getResource(string $type)
    {
        if (isset(self::$resources[$type])) {
            return self::$resources[$type];
        }
        $class = '\\sdopx\\resource\\' . Utils::toCamel($type) . 'Resource';
        if (class_exists($class)) {
            self::$resources[$type] = new $class();
            return self::$resources[$type];
        }
        return null;
    }
927342
public function getClassName(string $type): string
    {
        assert(isset($this->classes[$type]));
        return $this->classes[$type];
    }
1099729
public static function getClassname($type)
    {
        if (!isset(self::$__classnames[$type])) {
            $classname = 'AnDomainAttribute'.ucfirst($type);
            $classname = class_exists($classname) ?  $classname : $type;
            if (!is($classname, 'AnDomainAttributeInterface')) {
                throw new AnDomainExceptionType($classname.' must implements AnDomainAttributeInterface');
            }
            self::$__classnames[$type] = $classname;
        }

        return self::$__classnames[$type];
    }
731423
public function getTypeValidator($type)
    {
        if (in_array($type, $this->allowedTypeValidators, true) == false) {
            throw new InvalidTypeValidatorException('The type "'.$type.'" is invalid');
        }

        if (isset($this->typeValidators[$type]) == false) {
            $className = 'Mooti\\Validator\\TypeValidator\\'.ucfirst($type).'Validator';
            $this->typeValidators[$type] = $this->createNew($className);
        }

        return $this->typeValidators[$type];
    }
496907
public function getBaseNamespace($type = null)
    {
        if ($type === null) {
            $type = $this->type;
        }
        switch ($type) {
            case Module::TYPE_ADDON:
                return str_replace('/', '\\', ltrim(WechatModule::ADDON_MODULE_PATH, '@'));
            case Module::TYPE_CORE:
                return str_replace('/', '\\', ltrim(WechatModule::CORE_MODULE_PATH, '@'));
            default:
                return false;
        }
    }
415225
public function getBodyByType($type)
    {
        if (isset($this->bodyList[$type])) {
            return $this->bodyList[$type];
        }
        if (isset($this->bodyList['*/*'])) {
            return $this->bodyList['*/*'];
        }

        throw new \InvalidArgumentException(\sprintf('No body found for type "%s"', $type));
    }
723364
protected function getFullNamespace($type, $strNs)
    {
        if ($type !== '' && $type{0} != '\\') {
            //create a full qualified namespace
            if ($strNs != '') {
                $type = '\\' . $strNs . '\\' . $type;
            }
        }
        return $type;
    }
260654
public function getHeader($type = 'content_type')
    {
        return (array_key_exists($type, $this->result)) ? $this->result[$type] : null;
    }
551267
public function getPart($type)
    {
        $parts = $this->getParts();

        foreach ($parts as $part) {
            if (0 === strpos($part->getHeaders()->get('Content-Type'), $type)) {
                return $part;
            }
        }

        throw new \InvalidArgumentException(sprintf('Unable to find part with Content-Type "%s" in parts. Got: %s', $type, implode("", array_map(function ($part) {
            return "\n- ".$part->getHeaders()->get('Content-Type');
        }, $parts))));
    }
988110
protected static function getClassName($type)
    {
        if (in_array($type, array_keys(self::$elements))) {
            $type = self::$elements[$type];
        }

        if (!class_exists($type)) {
            throw new InvalidArgumentException(
                "Input class '{$type}' does not exists."
            );
        }

        if (! is_subclass_of($type, ElementInterface::class)) {
            throw new InvalidArgumentException(
                "The class '{$type}' does not implement the " .
                "Slick\\Form\\ElementInterface interface."
            );
        }

        return $type;
    }