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));
    }
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));
    }
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 ) ) ; }
Return script tag.

@param string $name

@return string|null
@throws InvalidArgumentException
Return script tag .