Return the type for a custom field class.

@param string $prefix The prefix of the namespace.

@return array
969982
private function customFieldInstance($prefix): array
    {
        $ns = $this->xmlns[$prefix];

        if (!$discoveredCustomField = $this->customFields[$ns]) {
            throw new LogicException(
                sprintf(
                    'No custom field class was found for %s. setCustomFields() must be called before using this extractor.',
                    $ns
                )
            );
        }

        return [new Type('object', false, $discoveredCustomField->getClass())];
    }
31254
protected function getPropertyBuilder($prefix)
    {
        $build = function ($value, $key, $sub = null) use (&$prefix, &$build) {
            $sub = ($sub ? $sub : $prefix);

            if (!is_numeric($key)) {
                $sub .= static::SEP_MAJOR . $this->fixString($key);
            }

            if (is_array($value)) {
                return array_map(
                    $build,
                    $value,
                    array_keys($value),
                    array_fill(0, count($value), $sub)
                );
            }

            $sep = (
                $prefix === $sub
                ? static::SEP_MINOR
                : str_repeat(static::SEP_MAJOR, static::SEP_MULTI)
            );

            return $sub . $sep . $this->fixString($value);
        };

        return $build;
    }
1317937
protected function getFieldType(CustomField $field)
    {
        $type  = explode(':', $field->type);
        $where = ['name' => head($type)];
        if (count($type) > 1) {
            $where['type'] = last($type);
        }
        return FieldType::query()->where($where)->firstOrFail(['id']);
    }
694477
protected function loadDataForPrefix($namespace, $prefix)
    {
        $this->failOnMissingNamespace($namespace);

        if (!isset($this->cachedData[$namespace])) {
            $this->cachedData[$namespace] = [];
        }

        if (!isset($this->cachedData[$namespace][$prefix])) {
            $this->cachedData[$namespace][$prefix] = [];
        }

        foreach ($this->addedData[$namespace] as $data) {

            if (isset($data[$prefix])) {
                $this->cachedData[$namespace][$prefix][] = $data[$prefix];
            }
        }

        return $this->cachedData[$namespace][$prefix];
    }
570743
protected function get_protected_field(string $prefix = '') : \stdClass {
        $fieldname = "{$prefix}protected";

        return (object) [
            'fields' => [
                $this->_form->createElement(
                        'advcheckbox',
                        $fieldname,
                        get_string('protected', 'tool_dataprivacy'),
                        get_string('protectedlabel', 'tool_dataprivacy')
                    ),
            ],
        ];
    }
75269
function getNamespaceFromPrefix($prefix){
		if (isset($this->namespaces[$prefix])) {
			return $this->namespaces[$prefix];
		}
		//$this->setError("No namespace registered for prefix '$prefix'");
		return false;
	}
1137407
public function getType( $name, $prefix = null )
	{
		// It can be the case that the type passed in is an array.  This can happen if the type for an
		// element is defined in the schema as simpleContent extending some base type by restriction.
		// In case this could be the case, look for an array with an element key of 'class' and value
		// 'simple'. If found, there should be an element with a key of 'parent'.  Use this.
		if ( is_array( $name ) && isset( $name['class'] ) && isset( $name['parent'] ) )
		{
			$name = $name['parent'];
		}

		if ( strpos( $name, ":" ) === false && is_null( $prefix ) )
		{
			// Assume xs
			$prefix = "xs";
		}

		return $this->hasType( $name, $prefix )
			? $this->types[ is_null( $prefix ) ? $name : "$prefix:$name" ]
			: false;
	}
1235060
public function getNamespaceForPrefix( $prefix )
	{
		if ( ! isset( $this->instance_namespaces[ $prefix ] ) ) return null;
		return $this->instance_namespaces[ $prefix ];
	}
37061
public function getClassNamespace(bool $prefix = false): string
	{
		if($this->classNamespace === null)
		{
			$this->classNamespace = substr(static::class, 0, strrpos(static::class, '\\'));
		}

		return $prefix ? '\\' . $this->classNamespace : $this->classNamespace;
	}
897106
public static function getAll($prefix = '')
		{

			// Make backend load all
			$backend = static::getBackend();
			$backend->loadAll($prefix);

			// Now return requested translations
			return $backend->translations($prefix);

		}
991806
public function getLoader($prefix)
    {
        if (!$this->hasLoader($prefix)) {
            throw new \InvalidArgumentException(sprintf('A loader is not registered for the prefix "%s"', $prefix));
        }

        return $this->loaders[$prefix];
    }
944674
public function getByPrefix($prefix)
    {
        if (!array_key_exists($prefix, $this->prefixed)) {
            return array();
        }

        $services = array();
        foreach ($this->prefixed[$prefix] as $id) {
            $services[] = $this->get($id);
        }

        return $services;
    }
55901
public function getClass($prefix = "ts3_")
    {
        if ($this instanceof Channel && $this->isSpacer()) {
            return $prefix . "spacer";
        } elseif ($this instanceof Client && $this["client_type"]) {
            return $prefix . "query";
        }

        return $prefix . String::factory(get_class($this))->section("_", 2)->toLower();
    }
515294
public static function checkUrlPrefix($prefix) {
        return isset(self::$prefix['check'][ $prefix ]) ? self::$prefix['check'][ $prefix ] : null;
    }
1022300
protected static function getClassMethodsByPrefix($prefix = null)
    {
        //
        $attribute = 'MethodsByPrefix:'.$prefix;

        if (!static::hasClassAttribute($attribute)) {
            $class = static::getClass();
            $allMethods = get_class_methods($class);
            $methods = [];

            if (count($allMethods) > 0) {
                foreach ($allMethods as $method) {
                    if (preg_match('/^'.$prefix.'/i', $method)) {
                        $methods[] = $method;
                    }
                }
            }
            asort($methods);

            static::setClassAttribute($attribute, $methods);
        }

        //
        return static::getClassAttribute($attribute);
    }
399654
public static function prefix($prefix = '') {
        $that = self::driver();
        $that->prefix($prefix);
        if (empty($prefix)) {
            return $that->config['prefix'];
        }
        $that->config['prefix'] = $prefix;
    }
1076679
public function getCallback($prefix)
    {
        if ($this->isRegistered($prefix) && !$this->_callbacks[$prefix]['is_fallback']) {
            return $this->_callbacks[$prefix]['callback'];
        }

        if ($callback = $this->findUnregisteredCallback($prefix)) {
            return $callback;
        }

        if ($this->isRegistered($prefix)) {
            return $this->_callbacks[$prefix]['callback'];
        }

        return null;
    }