Return script tag.

@param string $name

@return string|null
@throws InvalidArgumentException
5893
protected function getContextTypeClass($name)
    {
        // Check for custom context type
        if (class_exists($name)) {
            return $name;
        }

        // Create local context type class
        $class = ucwords(str_replace(['-', '_'], ' ', $name));
        $class = '\\JsonLd\\ContextTypes\\' . str_replace(' ', '', $class);

        // Check for local context type
        if (class_exists($class)) {
            return $class;
        }

        // Backwards compatible, remove in a future version
        switch ($name) {
            case 'address':
                return ContextTypes\PostalAddress::class;
                break;
            case 'business':
                return ContextTypes\LocalBusiness::class;
                break;
            case 'breadcrumbs':
                return ContextTypes\BreadcrumbList::class;
                break;
            case 'geo':
                return ContextTypes\GeoCoordinates::class;
                break;
        }

        throw new InvalidArgumentException(sprintf('Undefined context type: "%s"', $name));
    }
616617
private function get(string $name){
		$method = 'magic_get_'.$name;

		return \method_exists($this, $method) ? $this->$method() : null;
	}
1128003
public function get(string $name): string {
        if (!isset($this->get[$name])) {
            return "";
        }
        return $this->get[$name];
    }
547880
public function getFirstTag($name)
    {
        foreach ($this->tags as $i => $tag) {
            if (strtolower($tag->getName()) == $name) {
                return $this->tags[$i];
            }
        }

        return null;
    }
1091520
public function loadOrCreateTag($name)
    {
        $tag = $this->loadTag($name);
        if (null === $tag) {
            $tag = $this->createTag($name);
        }

        return $tag;
    }
524477
function GetHtmlAttribute($name)
        {
            if (isset($this->attributes[$name]))
                    return $this->attributes[$name];
            
            return null;
        }
1103158
public function getArgument($name) {
        if (!$this->definition->hasArgument($name)) {
            throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name));
        }

        return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)
            ->getDefault();
    }
672933
public function getClassName($name)
    {
        if (!isset($this->mapping[$name])) {
            throw new \InvalidArgumentException(sprintf('Could not find "%s"', $name));
        }

        return $this->mapping[$name];
    }
1081061
private function & _getScriptsGroupContainer ($name = '') {
		$ctrlActionKey = $this->getCtrlActionKey();
		if (!isset(self::$scriptsGroupContainer[$ctrlActionKey])) {
			self::$scriptsGroupContainer[$ctrlActionKey] = [];
		}
		if (!isset(self::$scriptsGroupContainer[$ctrlActionKey][$name])) {
			self::$scriptsGroupContainer[$ctrlActionKey][$name] = [];
		}
		return self::$scriptsGroupContainer[$ctrlActionKey][$name];
	}
894583
public function getCustomHtmlAttrib($name)
        {
            if (!is_string($name)) {
                throw new Exception(
                    'Invalid argument: $name must be a string'
                );
            }

            if (isset($this->_customHtmlAttribs[$name])) {
                return $this->_customHtmlAttribs[$name];
            }

            return null;
        }
549144
public function getTag(string $name, $default = null)
    {
        return isset($this->tags[$name]) ? $this->tags[$name] : $default;
    }
377882
public function getElement($name)
    {
        $elements = $this->getElements();

        return isset($elements[$name]) ? $elements[$name] : null;
    }
1081440
private function getStageClassName(string $name): string
    {
        if (!empty($this->stagesByName[$name])) {
            return $this->stagesByName[$name];
        }
        if (!empty($this->defaultStage) && !empty($this->stagesByName[$this->defaultStage])) {
            return $this->stagesByName[$this->defaultStage];
        }
        throw new InvalidArgumentException('The request stage could not be found and there is no default stage defined.');
    }
824628
public function get($name)
    {
        $toggle = $this->collection->get($name);
        if(!$toggle){
            throw new \InvalidArgumentException("Cannot find Toggle with name $name");
        }

        return $toggle;
    }
370083
public function getEventScript($name)
    {
        $cacheKey = Cache::EVENT_SCRIPT_CACHE_PREFIX . $name;
        try {
            /** @var EventScript $model */
            $model = \Cache::rememberForever($cacheKey, function () use ($name) {
                if ($model = EventScript::whereName($name)->whereIsActive(true)->first()) {
                    return $model;
                }

                return ''; // so that we don't hit the database even after we know it isn't there
            });

            if (!empty($model)) {
                return $model;
            }
        } catch (\Exception $ex) {
        }

        return null;
    }
628643
public function getElement($name)
    {

        if (!isset($this->elements[$name])) {
            throw new InvalidArgumentException(" Element not found : {$name}");
        }

        return $this->elements[$name];
    }
1193560
public function get(string $name = null): \TheCMSThread\Classes\Plugin
    {
        if (empty($name) === false && empty($this->plugins[$name]) === false) {
            return $this->plugins[$name];
        } else {
            throw new \InvalidArgumentException("Plugin not found");
        }
    }